Bug 1665749 [wpt PR 25603] - [LayoutShiftTracker] Fix contain:paint, a=testonly
[gecko.git] / .eslintrc.js
blobd3074909fd13f50677531202917f8f45b10f4ae6
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 "use strict";
7 const xpcshellTestConfig = require("eslint-plugin-mozilla/lib/configs/xpcshell-test.js");
8 const browserTestConfig = require("eslint-plugin-mozilla/lib/configs/browser-test.js");
9 const mochitestTestConfig = require("eslint-plugin-mozilla/lib/configs/mochitest-test.js");
10 const chromeTestConfig = require("eslint-plugin-mozilla/lib/configs/chrome-test.js");
11 const fs = require("fs");
12 const path = require("path");
14 /**
15  * Some configurations have overrides, which can't be specified within overrides,
16  * so we need to remove them.
17  */
18 function removeOverrides(config) {
19   config = { ...config };
20   delete config.overrides;
21   return config;
24 const xpcshellTestPaths = ["**/test*/unit*/", "**/test*/xpcshell/"];
26 const browserTestPaths = ["**/test*/**/browser*/"];
28 const mochitestTestPaths = [
29   // Note: we do not want to match testing/mochitest as that would apply
30   // too many globals for that directory.
31   "**/test/mochitest/",
32   "**/tests/mochitest/",
33   "**/test/mochitests/",
34   "testing/mochitest/tests/SimpleTest/",
35   "testing/mochitest/tests/Harness_sanity/",
38 const chromeTestPaths = ["**/test*/chrome/"];
40 const ignorePatterns = [
41   ...fs
42     .readFileSync(
43       path.join(__dirname, "tools", "rewriting", "ThirdPartyPaths.txt")
44     )
45     .toString("utf-8")
46     .split("\n"),
47   ...fs
48     .readFileSync(
49       path.join(__dirname, "devtools", "client", "debugger", ".eslintignore")
50     )
51     .toString("utf-8")
52     .split("\n")
53     .filter(p => p && !p.startsWith("#"))
54     .map(p => `devtools/client/debugger/${p}`),
57 module.exports = {
58   parser: "babel-eslint",
59   parserOptions: {
60     sourceType: "script",
61     babelOptions: {
62       configFile: path.join(__dirname, ".babel-eslint.rc.js"),
63     },
64   },
65   ignorePatterns,
66   // Ignore eslint configurations in parent directories.
67   root: true,
68   // New rules and configurations should generally be added in
69   // tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js to
70   // allow external repositories that use the plugin to pick them up as well.
71   extends: ["plugin:mozilla/recommended"],
72   plugins: ["mozilla"],
73   overrides: [
74     {
75       // All .eslintrc.js files are in the node environment, so turn that
76       // on here.
77       // https://github.com/eslint/eslint/issues/13008
78       files: [".eslintrc.js"],
79       env: {
80         node: true,
81         browser: false,
82       },
83     },
84     {
85       files: [
86         "*.html",
87         "*.xhtml",
88         "*.xul",
89         "*.xml",
90         "js/src/builtin/**/*.js",
91         "js/src/shell/**/*.js",
92       ],
93       rules: {
94         // Curly brackets are required for all the tree via recommended.js,
95         // however these files aren't auto-fixable at the moment.
96         curly: "off",
97       },
98     },
99     {
100       // TODO: Bug 1515949. Enable no-undef for gfx/
101       files: "gfx/layers/apz/test/mochitest/**",
102       rules: {
103         "no-undef": "off",
104       },
105     },
106     {
107       ...removeOverrides(xpcshellTestConfig),
108       files: xpcshellTestPaths.map(path => `${path}**`),
109       excludedFiles: "devtools/**",
110     },
111     {
112       // If it is an xpcshell head file, we turn off global unused variable checks, as it
113       // would require searching the other test files to know if they are used or not.
114       // This would be expensive and slow, and it isn't worth it for head files.
115       // We could get developers to declare as exported, but that doesn't seem worth it.
116       files: xpcshellTestPaths.map(path => `${path}head*.js`),
117       rules: {
118         "no-unused-vars": [
119           "error",
120           {
121             args: "none",
122             vars: "local",
123           },
124         ],
125       },
126     },
127     {
128       ...browserTestConfig,
129       files: browserTestPaths.map(path => `${path}**`),
130       excludedFiles: "devtools/**",
131     },
132     {
133       ...removeOverrides(mochitestTestConfig),
134       files: mochitestTestPaths.map(path => `${path}**`),
135       excludedFiles: [
136         "devtools/**",
137         "security/manager/ssl/tests/mochitest/browser/**",
138       ],
139     },
140     {
141       ...removeOverrides(chromeTestConfig),
142       files: chromeTestPaths.map(path => `${path}**`),
143       excludedFiles: ["devtools/**"],
144     },
145     {
146       env: {
147         // Ideally we wouldn't be using the simpletest env here, but our uses of
148         // js files mean we pick up everything from the global scope, which could
149         // be any one of a number of html files. So we just allow the basics...
150         "mozilla/simpletest": true,
151       },
152       files: [
153         ...mochitestTestPaths.map(path => `${path}/**/*.js`),
154         ...chromeTestPaths.map(path => `${path}/**/*.js`),
155       ],
156     },
157     {
158       files: [
159         "netwerk/cookie/test/browser/**",
160         "netwerk/test/browser/**",
161         "netwerk/test/mochitests/**",
162         "netwerk/test/unit*/**",
163       ],
164       rules: {
165         "mozilla/no-arbitrary-setTimeout": "off",
166         "mozilla/no-define-cc-etc": "off",
167         "mozilla/use-services": "off",
168         "consistent-return": "off",
169         "no-eval": "off",
170         "no-global-assign": "off",
171         "no-nested-ternary": "off",
172         "no-redeclare": "off",
173         "no-shadow": "off",
174         "no-throw-literal": "off",
175         "no-unused-vars": "off",
176       },
177     },
178     {
179       files: ["layout/**"],
180       rules: {
181         "object-shorthand": "off",
182         "mozilla/avoid-removeChild": "off",
183         "mozilla/consistent-if-bracing": "off",
184         "mozilla/reject-importGlobalProperties": "off",
185         "mozilla/no-arbitrary-setTimeout": "off",
186         "mozilla/no-define-cc-etc": "off",
187         "mozilla/use-chromeutils-generateqi": "off",
188         "mozilla/use-default-preference-values": "off",
189         "mozilla/use-includes-instead-of-indexOf": "off",
190         "mozilla/use-services": "off",
191         "mozilla/use-ownerGlobal": "off",
192         complexity: "off",
193         "consistent-return": "off",
194         "no-array-constructor": "off",
195         "no-caller": "off",
196         "no-cond-assign": "off",
197         "no-extra-boolean-cast": "off",
198         "no-eval": "off",
199         "no-func-assign": "off",
200         "no-global-assign": "off",
201         "no-implied-eval": "off",
202         "no-lonely-if": "off",
203         "no-nested-ternary": "off",
204         "no-new-wrappers": "off",
205         "no-redeclare": "off",
206         "no-restricted-globals": "off",
207         "no-return-await": "off",
208         "no-sequences": "off",
209         "no-throw-literal": "off",
210         "no-useless-concat": "off",
211         "no-undef": "off",
212         "no-unreachable": "off",
213         "no-unsanitized/method": "off",
214         "no-unsanitized/property": "off",
215         "no-unsafe-negation": "off",
216         "no-unused-vars": "off",
217         "no-useless-return": "off",
218       },
219     },
220     {
221       files: [
222         "dom/animation/**",
223         "dom/base/test/*.*",
224         "dom/base/test/unit/test_serializers_entities*.js",
225         "dom/base/test/unit_ipc/**",
226         "dom/base/test/jsmodules/**",
227         "dom/base/*.*",
228         "dom/canvas/**",
229         "dom/encoding/**",
230         "dom/events/**",
231         "dom/fetch/**",
232         "dom/file/**",
233         "dom/html/**",
234         "dom/jsurl/**",
235         "dom/media/tests/**",
236         "dom/media/webaudio/**",
237         "dom/media/webspeech/**",
238         "dom/messagechannel/**",
239         "dom/midi/**",
240         "dom/network/**",
241         "dom/payments/**",
242         "dom/performance/**",
243         "dom/permission/**",
244         "dom/quota/**",
245         "dom/security/test/cors/**",
246         "dom/security/test/csp/**",
247         "dom/security/test/general/**",
248         "dom/security/test/https-only/**",
249         "dom/security/test/mixedcontentblocker/**",
250         "dom/security/test/sri/**",
251         "dom/security/test/referrer-policy/**",
252         "dom/serviceworkers/**",
253         "dom/smil/**",
254         "dom/tests/mochitest/**",
255         "dom/u2f/**",
256         "dom/vr/**",
257         "dom/webauthn/**",
258         "dom/webgpu/**",
259         "dom/websocket/**",
260         "dom/workers/**",
261         "dom/worklet/**",
262         "dom/xml/**",
263         "dom/xslt/**",
264         "dom/xul/**",
265         "dom/ipc/test.xhtml",
266       ],
267       rules: {
268         "consistent-return": "off",
269         "mozilla/avoid-removeChild": "off",
270         "mozilla/consistent-if-bracing": "off",
271         "mozilla/no-arbitrary-setTimeout": "off",
272         "mozilla/no-compare-against-boolean-literals": "off",
273         "mozilla/no-define-cc-etc": "off",
274         "mozilla/reject-importGlobalProperties": "off",
275         "mozilla/use-cc-etc": "off",
276         "mozilla/use-chromeutils-generateqi": "off",
277         "mozilla/use-chromeutils-import": "off",
278         "mozilla/use-includes-instead-of-indexOf": "off",
279         "mozilla/use-ownerGlobal": "off",
280         "mozilla/use-services": "off",
281         "no-array-constructor": "off",
282         "no-caller": "off",
283         "no-cond-assign": "off",
284         "no-control-regex": "off",
285         "no-debugger": "off",
286         "no-else-return": "off",
287         "no-empty": "off",
288         "no-eval": "off",
289         "no-func-assign": "off",
290         "no-global-assign": "off",
291         "no-implied-eval": "off",
292         "no-lone-blocks": "off",
293         "no-lonely-if": "off",
294         "no-nested-ternary": "off",
295         "no-new-object": "off",
296         "no-new-wrappers": "off",
297         "no-octal": "off",
298         "no-redeclare": "off",
299         "no-return-await": "off",
300         "no-restricted-globals": "off",
301         "no-self-assign": "off",
302         "no-self-compare": "off",
303         "no-sequences": "off",
304         "no-shadow": "off",
305         "no-shadow-restricted-names": "off",
306         "no-sparse-arrays": "off",
307         "no-throw-literal": "off",
308         "no-unreachable": "off",
309         "no-unsanitized/method": "off",
310         "no-unsanitized/property": "off",
311         "no-undef": "off",
312         "no-unused-vars": "off",
313         "no-useless-call": "off",
314         "no-useless-concat": "off",
315         "no-useless-return": "off",
316         "no-with": "off",
317       },
318     },
319     {
320       files: [
321         "dom/l10n/tests/mochitest/document_l10n/non-system-principal/test.html",
322         "dom/payments/test/test_basiccard.html",
323         "dom/payments/test/test_bug1478740.html",
324         "dom/payments/test/test_canMakePayment.html",
325         "dom/payments/test/test_closePayment.html",
326         "dom/payments/test/test_showPayment.html",
327         "dom/tests/browser/browser_persist_cookies.js",
328         "dom/tests/browser/browser_persist_mixed_content_image.js",
329         "netwerk/test/unit/test_http2-proxy.js",
330       ],
331       rules: {
332         "no-async-promise-executor": "off",
333       },
334     },
335     {
336       files: [
337         "testing/mochitest/browser-harness.xhtml",
338         "testing/mochitest/chrome/test_chromeGetTestFile.xhtml",
339         "testing/mochitest/chrome/test_sanityEventUtils.xhtml",
340         "testing/mochitest/chrome/test_sanityException.xhtml",
341         "testing/mochitest/chrome/test_sanityException2.xhtml",
342         "testing/mochitest/harness.xhtml",
343       ],
344       rules: {
345         "dot-notation": "off",
346         "object-shorthand": "off",
347         "mozilla/use-services": "off",
348         "mozilla/no-compare-against-boolean-literals": "off",
349         "mozilla/no-useless-parameters": "off",
350         "mozilla/no-useless-removeEventListener": "off",
351         "mozilla/use-cc-etc": "off",
352         "consistent-return": "off",
353         "no-fallthrough": "off",
354         "no-nested-ternary": "off",
355         "no-redeclare": "off",
356         "no-sequences": "off",
357         "no-shadow": "off",
358         "no-throw-literal": "off",
359         "no-undef": "off",
360         "no-unsanitized/property": "off",
361         "no-unused-vars": "off",
362         "no-useless-call": "off",
363       },
364     },
365     {
366       files: [
367         "docshell/test/chrome/bug113934_window.xhtml",
368         "docshell/test/chrome/bug215405_window.xhtml",
369         "docshell/test/chrome/bug293235_window.xhtml",
370         "docshell/test/chrome/bug294258_window.xhtml",
371         "docshell/test/chrome/bug298622_window.xhtml",
372         "docshell/test/chrome/bug301397_window.xhtml",
373         "docshell/test/chrome/bug303267_window.xhtml",
374         "docshell/test/chrome/bug311007_window.xhtml",
375         "docshell/test/chrome/bug321671_window.xhtml",
376         "docshell/test/chrome/bug360511_window.xhtml",
377         "docshell/test/chrome/bug396519_window.xhtml",
378         "docshell/test/chrome/bug396649_window.xhtml",
379         "docshell/test/chrome/bug449778_window.xhtml",
380         "docshell/test/chrome/bug449780_window.xhtml",
381         "docshell/test/chrome/bug582176_window.xhtml",
382         "docshell/test/chrome/bug662200_window.xhtml",
383         "docshell/test/chrome/bug690056_window.xhtml",
384         "docshell/test/chrome/bug89419_window.xhtml",
385         "docshell/test/chrome/mozFrameType_window.xhtml",
386         "docshell/test/chrome/test_bug453650.xhtml",
387         "docshell/test/chrome/test_bug454235.xhtml",
388         "docshell/test/chrome/test_bug565388.xhtml",
389         "docshell/test/chrome/test_bug608669.xhtml",
390         "docshell/test/chrome/test_bug789773.xhtml",
391         "docshell/test/chrome/test_bug846906.xhtml",
392         "docshell/test/chrome/test_docRedirect.xhtml",
393         "docshell/test/chrome/test_principalInherit.xhtml",
394         "docshell/test/chrome/test_viewsource_forbidden_in_iframe.xhtml",
395       ],
396       rules: {
397         "dot-notation": "off",
398         "no-global-assign": "off",
399         "no-octal": "off",
400         "object-shorthand": "off",
401         "mozilla/consistent-if-bracing": "off",
402         "mozilla/no-compare-against-boolean-literals": "off",
403         "mozilla/no-useless-parameters": "off",
404         "mozilla/no-useless-removeEventListener": "off",
405         "mozilla/use-cc-etc": "off",
406         "mozilla/use-services": "off",
407         "mozilla/use-chromeutils-generateqi": "off",
408         "consistent-return": "off",
409         "no-delete-var": "off",
410         "no-redeclare": "off",
411         "no-sequences": "off",
412         "no-shadow": "off",
413         "no-undef": "off",
414         "no-unused-vars": "off",
415         "no-useless-call": "off",
416       },
417     },
418     {
419       files: [
420         "widget/tests/native_menus_window.xhtml",
421         "widget/tests/native_mouse_mac_window.xhtml",
422         "widget/tests/standalone_native_menu_window.xhtml",
423         "widget/tests/system_font_changes.xhtml",
424         "widget/tests/taskbar_previews.xhtml",
425         "widget/tests/test_bug1123480.xhtml",
426         "widget/tests/test_bug343416.xhtml",
427         "widget/tests/test_bug428405.xhtml",
428         "widget/tests/test_bug429954.xhtml",
429         "widget/tests/test_bug466599.xhtml",
430         "widget/tests/test_bug485118.xhtml",
431         "widget/tests/test_bug517396.xhtml",
432         "widget/tests/test_bug538242.xhtml",
433         "widget/tests/test_bug596600.xhtml",
434         "widget/tests/test_bug673301.xhtml",
435         "widget/tests/test_bug760802.xhtml",
436         "widget/tests/test_chrome_context_menus_win.xhtml",
437         "widget/tests/test_clipboard.xhtml",
438         "widget/tests/test_input_events_on_deactive_window.xhtml",
439         "widget/tests/test_key_event_counts.xhtml",
440         "widget/tests/test_keycodes.xhtml",
441         "widget/tests/test_panel_mouse_coords.xhtml",
442         "widget/tests/test_position_on_resize.xhtml",
443         "widget/tests/test_sizemode_events.xhtml",
444         "widget/tests/test_taskbar_progress.xhtml",
445         "widget/tests/test_transferable_overflow.xhtml",
446         "widget/tests/window_bug429954.xhtml",
447         "widget/tests/window_bug478536.xhtml",
448         "widget/tests/window_composition_text_querycontent.xhtml",
449         "widget/tests/window_state_windows.xhtml",
450         "widget/tests/window_wheeltransaction.xhtml",
451       ],
452       rules: {
453         complexity: "off",
454         "consistent-return": "off",
455         "dot-notation": "off",
456         "mozilla/prefer-boolean-length-check": "off",
457         "mozilla/no-useless-parameters": "off",
458         "mozilla/no-useless-removeEventListener": "off",
459         "mozilla/use-cc-etc": "off",
460         "mozilla/use-chromeutils-generateqi": "off",
461         "mozilla/use-services": "off",
462         "object-shorthand": "off",
463         "no-caller": "off",
464         "no-delete-var": "off",
465         "no-nested-ternary": "off",
466         "no-new-object": "off",
467         "no-redeclare": "off",
468         "no-sequences": "off",
469         "no-shadow": "off",
470         "no-undef": "off",
471         "no-unsafe-finally": "off",
472         "no-unsanitized/property": "off",
473         "no-unused-vars": "off",
474         "no-useless-return": "off",
475       },
476     },
477     {
478       files: [
479         "dom/base/test/chrome/file_bug1139964.xhtml",
480         "dom/base/test/chrome/file_bug549682.xhtml",
481         "dom/base/test/chrome/file_bug616841.xhtml",
482         "dom/base/test/chrome/file_bug990812-1.xhtml",
483         "dom/base/test/chrome/file_bug990812-2.xhtml",
484         "dom/base/test/chrome/file_bug990812-3.xhtml",
485         "dom/base/test/chrome/file_bug990812-4.xhtml",
486         "dom/base/test/chrome/file_bug990812-5.xhtml",
487         "dom/base/test/chrome/file_bug990812.xhtml",
488         "dom/base/test/chrome/test_bug1098074_throw_from_ReceiveMessage.xhtml",
489         "dom/base/test/chrome/test_bug339494.xhtml",
490         "dom/base/test/chrome/test_bug429785.xhtml",
491         "dom/base/test/chrome/test_bug467123.xhtml",
492         "dom/base/test/chrome/test_bug683852.xhtml",
493         "dom/base/test/chrome/test_bug780529.xhtml",
494         "dom/base/test/chrome/test_bug800386.xhtml",
495         "dom/base/test/chrome/test_bug884693.xhtml",
496         "dom/base/test/chrome/test_document-element-inserted.xhtml",
497         "dom/base/test/chrome/test_domparsing.xhtml",
498         "dom/base/test/chrome/test_fileconstructor.xhtml",
499         "dom/base/test/chrome/title_window.xhtml",
500         "dom/base/test/chrome/window_nsITextInputProcessor.xhtml",
501         "dom/base/test/chrome/window_swapFrameLoaders.xhtml",
502         "dom/base/test/test_domrequesthelper.xhtml",
503         "dom/bindings/test/test_bug1123516_maplikesetlikechrome.xhtml",
504         "dom/console/tests/test_jsm.xhtml",
505         "dom/events/test/test_bug1412775.xhtml",
506         "dom/events/test/test_bug336682_2.xhtml",
507         "dom/events/test/test_bug415498.xhtml",
508         "dom/events/test/test_bug602962.xhtml",
509         "dom/events/test/test_bug617528.xhtml",
510         "dom/events/test/test_bug679494.xhtml",
511         "dom/indexedDB/test/test_globalObjects_chrome.xhtml",
512         "dom/indexedDB/test/test_wrappedArray.xhtml",
513         "dom/ipc/test.xhtml",
514         "dom/ipc/tests/test_process_error.xhtml",
515         "dom/notification/test/chrome/test_notification_system_principal.xhtml",
516         "dom/plugins/test/mochitest/test_busy_hang.xhtml",
517         "dom/plugins/test/mochitest/test_convertpoint.xhtml",
518         "dom/plugins/test/mochitest/test_crash_notify.xhtml",
519         "dom/plugins/test/mochitest/test_crash_notify_no_report.xhtml",
520         "dom/plugins/test/mochitest/test_crash_submit.xhtml",
521         "dom/plugins/test/mochitest/test_hang_submit.xhtml",
522         "dom/plugins/test/mochitest/test_hangui.xhtml",
523         "dom/plugins/test/mochitest/test_idle_hang.xhtml",
524         "dom/plugins/test/mochitest/test_xulbrowser_plugin_visibility.xhtml",
525         "dom/plugins/test/mochitest/xulbrowser_plugin_visibility.xhtml",
526         "dom/security/test/general/test_bug1277803.xhtml",
527         "dom/serviceworkers/test/test_serviceworkerinfo.xhtml",
528         "dom/serviceworkers/test/test_serviceworkermanager.xhtml",
529         "dom/system/tests/test_constants.xhtml",
530         "dom/tests/mochitest/chrome/DOMWindowCreated_chrome.xhtml",
531         "dom/tests/mochitest/chrome/MozDomFullscreen_chrome.xhtml",
532         "dom/tests/mochitest/chrome/sizemode_attribute.xhtml",
533         "dom/tests/mochitest/chrome/test_cyclecollector.xhtml",
534         "dom/tests/mochitest/chrome/test_docshell_swap.xhtml",
535         "dom/tests/mochitest/chrome/window_focus.xhtml",
536         "dom/url/tests/test_bug883784.xhtml",
537         "dom/workers/test/test_WorkerDebugger.xhtml",
538         "dom/workers/test/test_WorkerDebugger_console.xhtml",
539         "dom/workers/test/test_fileReadSlice.xhtml",
540         "dom/workers/test/test_fileReaderSync.xhtml",
541         "dom/workers/test/test_fileSlice.xhtml",
542       ],
543       rules: {
544         "mozilla/no-useless-parameters": "off",
545         "mozilla/no-useless-removeEventListener": "off",
546         "mozilla/use-chromeutils-generateqi": "off",
547         "mozilla/use-services": "off",
548         complexity: "off",
549         "no-array-constructor": "off",
550         "no-caller": "off",
551         "no-empty": "off",
552         "no-eval": "off",
553         "no-lone-blocks": "off",
554         "no-octal": "off",
555         "no-redeclare": "off",
556         "no-shadow": "off",
557         "no-throw-literal": "off",
558         "no-undef": "off",
559         "no-unsanitized/method": "off",
560         "no-unused-vars": "off",
561         "no-useless-return": "off",
562         "object-shorthand": "off",
563       },
564     },
565     {
566       files: [
567         "accessible/**",
568         "devtools/**",
569         "dom/**",
570         "docshell/**",
571         "editor/libeditor/tests/**",
572         "editor/spellchecker/tests/test_bug338427.html",
573         "gfx/**",
574         "image/test/browser/browser_image.js",
575         "js/src/builtin/**",
576         "layout/**",
577         "mobile/android/**",
578         "modules/**",
579         "netwerk/**",
580         "remote/**",
581         "security/manager/**",
582         "services/**",
583         "storage/test/unit/test_vacuum.js",
584         "taskcluster/docker/periodic-updates/scripts/**",
585         "testing/**",
586         "tools/**",
587         "widget/tests/test_assign_event_data.html",
588       ],
589       rules: {
590         "mozilla/prefer-boolean-length-check": "off",
591       },
592     },
593     {
594       // TODO: Bug 1609271 Fix all violations for ChromeUtils.import(..., null)
595       files: [
596         "browser/base/content/test/forms/head.js",
597         "browser/base/content/test/general/browser_datachoices_notification.js",
598         "browser/base/content/test/plugins/head.js",
599         "browser/base/content/test/sync/browser_fxa_web_channel.js",
600         "browser/base/content/test/webextensions/head.js",
601         "browser/components/customizableui/test/browser_1042100_default_placements_update.js",
602         "browser/components/customizableui/test/browser_1096763_seen_widgets_post_reset.js",
603         "browser/components/customizableui/test/browser_1161838_inserted_new_default_buttons.js",
604         "browser/components/customizableui/test/browser_989338_saved_placements_not_resaved.js",
605         "browser/components/customizableui/test/browser_currentset_post_reset.js",
606         "browser/components/customizableui/test/browser_panel_keyboard_navigation.js",
607         "browser/components/enterprisepolicies/tests/browser/browser_policies_setAndLockPref_API.js",
608         "browser/components/enterprisepolicies/tests/browser/head.js",
609         "browser/components/enterprisepolicies/tests/xpcshell/head.js",
610         "browser/components/enterprisepolicies/tests/xpcshell/test_proxy.js",
611         "browser/components/enterprisepolicies/tests/xpcshell/test_runOnce_helper.js",
612         "browser/components/extensions/test/browser/browser_ext_browserAction_context.js",
613         "browser/components/extensions/test/browser/browser_ext_browserAction_popup.js",
614         "browser/components/extensions/test/browser/browser_ext_browserAction_popup_preload.js",
615         "browser/components/extensions/test/browser/browser_ext_currentWindow.js",
616         "browser/components/extensions/test/browser/browser_ext_getViews.js",
617         "browser/components/extensions/test/browser/browser_ext_management.js",
618         "browser/components/extensions/test/browser/browser_ext_menus_events.js",
619         "browser/components/extensions/test/browser/browser_ext_openPanel.js",
620         "browser/components/extensions/test/browser/browser_ext_pageAction_context.js",
621         "browser/components/extensions/test/browser/browser_ext_pageAction_popup.js",
622         "browser/components/extensions/test/browser/browser_ext_pageAction_show_matches.js",
623         "browser/components/extensions/test/browser/browser_ext_sessions_getRecentlyClosed_private.js",
624         "browser/components/extensions/test/browser/browser_ext_sessions_restore.js",
625         "browser/components/extensions/test/browser/browser_ext_tabs_audio.js",
626         "browser/components/extensions/test/browser/browser_ext_tabs_create_url.js",
627         "browser/components/extensions/test/browser/browser_ext_tabs_duplicate.js",
628         "browser/components/extensions/test/browser/browser_ext_tabs_newtab_private.js",
629         "browser/components/extensions/test/browser/browser_ext_tabs_removeCSS.js",
630         "browser/components/extensions/test/browser/browser_ext_tabs_zoom.js",
631         "browser/components/extensions/test/browser/browser_ext_windows.js",
632         "browser/components/extensions/test/browser/browser_ext_windows_events.js",
633         "browser/components/extensions/test/browser/head.js",
634         "browser/components/extensions/test/browser/head_webNavigation.js",
635         "browser/components/extensions/test/xpcshell/test_ext_url_overrides_newtab.js",
636         "browser/components/migration/tests/unit/test_Edge_db_migration.js",
637         "browser/components/preferences/tests/browser_contentblocking.js",
638         "browser/components/translation/test/unit/test_cld2.js",
639         "browser/components/urlbar/tests/ext/browser/update/browser_getBrowserUpdateStatus_updateDisabledByPolicy.js",
640         "browser/extensions/formautofill/test/unit/head.js",
641         "browser/extensions/formautofill/test/unit/test_creditCardRecords.js",
642         "browser/extensions/formautofill/test/unit/test_migrateRecords.js",
643         "browser/extensions/formautofill/test/unit/test_storage_remove.js",
644         "browser/extensions/formautofill/test/unit/test_storage_tombstones.js",
645         "browser/extensions/formautofill/test/unit/test_sync.js",
646         "browser/extensions/formautofill/test/unit/test_transformFields.js",
647         "browser/extensions/report-site-issue/experimentalAPIs/pageActionExtras.js",
648         "browser/extensions/report-site-issue/test/browser/head.js",
649         "browser/modules/test/unit/test_LiveBookmarkMigrator.js",
650         "devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_addons_debug_popup.js",
651         "dom/ipc/tests/browser_memory_distribution_telemetry.js",
652         "dom/push/test/xpcshell/head.js",
653         "dom/push/test/xpcshell/test_broadcast_success.js",
654         "dom/push/test/xpcshell/test_crypto.js",
655         "gfx/layers/apz/test/mochitest/browser_test_select_zoom.js",
656         "security/manager/ssl/RemoteSecuritySettings.jsm",
657         "security/manager/ssl/tests/unit/test_der.js",
658         "security/manager/ssl/X509.jsm",
659         "services/common/tests/unit/head_helpers.js",
660         "services/common/tests/unit/test_uptake_telemetry.js",
661         "services/fxaccounts/tests/xpcshell/test_accounts.js",
662         "services/fxaccounts/tests/xpcshell/test_accounts_device_registration.js",
663         "services/fxaccounts/tests/xpcshell/test_loginmgr_storage.js",
664         "services/fxaccounts/tests/xpcshell/test_oauth_token_storage.js",
665         "services/fxaccounts/tests/xpcshell/test_oauth_tokens.js",
666         "services/fxaccounts/tests/xpcshell/test_web_channel.js",
667         "services/sync/modules-testing/utils.js",
668         "services/sync/tests/unit/test_doctor.js",
669         "services/sync/tests/unit/test_postqueue.js",
670         "testing/marionette/components/marionette.js",
671         "testing/marionette/driver.js",
672         "testing/marionette/format.js",
673         "testing/marionette/server.js",
674         "testing/marionette/test/unit/test_prefs.js",
675         "testing/mochitest/browser-test.js",
676         "testing/mochitest/BrowserTestUtils/content/content-task.js",
677         "testing/xpcshell/head.js",
678         "toolkit/components/cloudstorage/tests/unit/test_cloudstorage.js",
679         "toolkit/components/crashes/tests/xpcshell/test_crash_manager.js",
680         "toolkit/components/crashes/tests/xpcshell/test_crash_service.js",
681         "toolkit/components/crashes/tests/xpcshell/test_crash_store.js",
682         "toolkit/components/enterprisepolicies/tests/browser/head.js",
683         "toolkit/components/enterprisepolicies/tests/EnterprisePolicyTesting.jsm",
684         "toolkit/components/enterprisepolicies/tests/xpcshell/head.js",
685         "toolkit/components/extensions/ExtensionPreferencesManager.jsm",
686         "toolkit/components/extensions/ExtensionXPCShellUtils.jsm",
687         "toolkit/components/extensions/ExtensionXPCShellUtils.jsm",
688         "toolkit/components/extensions/parent/ext-management.js",
689         "toolkit/components/extensions/test/mochitest/test_ext_contentscript_cache.html",
690         "toolkit/components/extensions/test/xpcshell/head_native_messaging.js",
691         "toolkit/components/extensions/test/xpcshell/test_ext_api_permissions.js",
692         "toolkit/components/extensions/test/xpcshell/test_ext_background_early_shutdown.js",
693         "toolkit/components/extensions/test/xpcshell/test_ext_background_teardown.js",
694         "toolkit/components/extensions/test/xpcshell/test_ext_contentscript_context.js",
695         "toolkit/components/extensions/test/xpcshell/test_ext_contentscript_context_isolation.js",
696         "toolkit/components/extensions/test/xpcshell/test_ext_contentscript_teardown.js",
697         "toolkit/components/extensions/test/xpcshell/test_ext_contexts_gc.js",
698         "toolkit/components/extensions/test/xpcshell/test_ext_privacy_disable.js",
699         "toolkit/components/extensions/test/xpcshell/test_ext_schemas_interactive.js",
700         "toolkit/components/extensions/test/xpcshell/test_ext_shutdown_cleanup.js",
701         "toolkit/components/extensions/test/xpcshell/test_ext_storage_sync_kinto.js",
702         "toolkit/components/extensions/test/xpcshell/test_ext_storage_sync_kinto_crypto.js",
703         "toolkit/components/extensions/test/xpcshell/test_ext_tab_teardown.js",
704         "toolkit/components/extensions/test/xpcshell/test_native_manifests.js",
705         "toolkit/components/featuregates/test/unit/test_FeatureGate.js",
706         "toolkit/components/mozintl/mozIntl.jsm",
707         "toolkit/components/normandy/test/browser/browser_actions_ShowHeartbeatAction.js",
708         "toolkit/components/osfile/modules/osfile_async_front.jsm",
709         "toolkit/components/osfile/modules/osfile_native.jsm",
710         "toolkit/components/osfile/tests/xpcshell/test_osfile_kill.js",
711         "toolkit/components/passwordmgr/test/unit/test_getFormFields.js",
712         "toolkit/components/passwordmgr/test/unit/test_getPasswordFields.js",
713         "toolkit/components/passwordmgr/test/unit/test_getUserNameAndPasswordFields.js",
714         "toolkit/components/processsingleton/MainProcessSingleton.jsm",
715         "toolkit/components/telemetry/tests/unit/head.js",
716         "toolkit/components/telemetry/tests/unit/test_EcosystemTelemetry.js",
717         "toolkit/components/telemetry/tests/unit/test_EventPing.js",
718         "toolkit/components/telemetry/tests/unit/test_HealthPing.js",
719         "toolkit/components/telemetry/tests/unit/test_PingAPI.js",
720         "toolkit/components/telemetry/tests/unit/test_PrioPing.js",
721         "toolkit/components/telemetry/tests/unit/test_TelemetryController_idle.js",
722         "toolkit/components/telemetry/tests/unit/test_TelemetryReportingPolicy.js",
723         "toolkit/components/telemetry/tests/unit/test_TelemetrySendOldPings.js",
724         "toolkit/components/telemetry/tests/unit/test_TelemetrySession.js",
725         "toolkit/modules/subprocess/test/xpcshell/test_subprocess.js",
726         "toolkit/modules/tests/xpcshell/test_GMPInstallManager.js",
727         "toolkit/mozapps/extensions/internal/AddonTestUtils.jsm",
728         "toolkit/mozapps/extensions/test/browser/browser_gmpProvider.js",
729         "toolkit/mozapps/extensions/test/xpcshell/head_addons.js",
730         "toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_clients.js",
731         "toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_regexp_split.js",
732         "toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_targetapp_filter.js",
733         "toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_telemetry.js",
734         "toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklistchange.js",
735         "toolkit/mozapps/extensions/test/xpcshell/test_gmpProvider.js",
736         "toolkit/mozapps/extensions/test/xpcshell/test_no_addons.js",
737         "toolkit/mozapps/extensions/test/xpcshell/test_permissions_prefs.js",
738         "toolkit/mozapps/extensions/test/xpcshell/test_signed_updatepref.js",
739         "toolkit/mozapps/extensions/test/xpcshell/test_signed_verify.js",
740         "toolkit/mozapps/extensions/test/xpcshell/test_webextension.js",
741         "toolkit/mozapps/extensions/test/xpcshell/test_webextension_events.js",
742         "toolkit/mozapps/extensions/test/xpcshell/test_XPIStates.js",
743         "toolkit/mozapps/installer/precompile_cache.js",
744       ],
745       rules: {
746         "mozilla/reject-chromeutils-import-null": "off",
747       },
748     },
749     {
750       files: [
751         "browser/base/content/browser-gestureSupport.js",
752         "browser/base/content/tabbrowser-tab.js",
753         "browser/base/content/tabbrowser-tabs.js",
754         "browser/base/content/tabbrowser.js",
755         "browser/components/downloads/DownloadsCommon.jsm",
756         "browser/components/downloads/content/allDownloadsView.js",
757         "browser/components/downloads/content/downloads.js",
758         "browser/components/downloads/content/indicator.js",
759         "browser/components/payments/res/components/csc-input.js",
760         "browser/components/payments/res/components/labelled-checkbox.js",
761         "browser/components/pocket/content/Pocket.jsm",
762         "browser/components/preferences/search.js",
763         "browser/components/search/content/search-one-offs.js",
764         "browser/components/search/content/searchbar.js",
765         "browser/components/sessionstore/ContentSessionStore.jsm",
766         "browser/components/urlbar/UrlbarInput.jsm",
767         "browser/components/urlbar/UrlbarView.jsm",
768         "browser/extensions/formautofill/content/customElements.js",
769         "browser/modules/PageActions.jsm",
770         "devtools/client/shared/async-store-helper.js",
771         "devtools/client/shared/prefs.js",
772         "devtools/shared/task.js",
773         "dom/base/SlowScriptDebug.jsm",
774         "dom/media/PeerConnection.jsm",
775         "mobile/android/chrome/geckoview/SessionStateAggregator.js",
776         "mobile/android/modules/geckoview/DelayedInit.jsm",
777         "services/sync/modules/record.js",
778         "toolkit/actors/AutoCompleteChild.jsm",
779         "toolkit/components/autocomplete/tests/unit/test_stopSearch.js",
780         "toolkit/components/enterprisepolicies/EnterprisePoliciesParent.jsm",
781         "toolkit/components/extensions/ExtensionParent.jsm",
782         "toolkit/components/osfile/modules/osfile_async_front.jsm",
783         "toolkit/components/osfile/modules/osfile_shared_allthreads.jsm",
784         "toolkit/content/aboutSupport.js",
785         "toolkit/content/customElements.js",
786         "toolkit/content/preferencesBindings.js",
787         "toolkit/content/tests/chrome/test_custom_element_base.xhtml",
788         "toolkit/content/viewZoomOverlay.js",
789         "toolkit/content/widgets/*.js",
790         "toolkit/modules/NewTabUtils.jsm",
791         "toolkit/modules/tests/modules/Task.jsm",
792         "toolkit/mozapps/extensions/AddonManager.jsm",
793         "toolkit/mozapps/extensions/internal/PluginProvider.jsm",
794         "toolkit/mozapps/extensions/internal/XPIDatabase.jsm",
795         "toolkit/mozapps/extensions/test/browser/head.js",
796         "toolkit/mozapps/extensions/test/xpcshell/head_addons.js",
797         "toolkit/mozapps/handling/content/dialog.js",
798       ],
799       rules: {
800         "no-setter-return": "off",
801       },
802     },
803   ],