Bug 1613876 [wpt PR 21654] - Reland "Move SMIL events tests to WPT", a=testonly
[gecko.git] / .eslintrc.js
blob2da3702da6bb89b4965d39b6fdf8c7f7e1a874fd
1 "use strict";
3 const xpcshellTestConfig = require("eslint-plugin-mozilla/lib/configs/xpcshell-test.js");
4 const browserTestConfig = require("eslint-plugin-mozilla/lib/configs/browser-test.js");
5 const mochitestTestConfig = require("eslint-plugin-mozilla/lib/configs/mochitest-test.js");
6 const chromeTestConfig = require("eslint-plugin-mozilla/lib/configs/chrome-test.js");
7 const fs = require("fs");
8 const path = require("path");
10 /**
11  * Some configurations have overrides, which can't be specified within overrides,
12  * so we need to remove them.
13  */
14 function removeOverrides(config) {
15   config = {...config};
16   delete config.overrides;
17   return config;
20 const xpcshellTestPaths = [
21   "**/test*/unit*/",
22   "**/test*/xpcshell/",
25 const browserTestPaths = [
26   "**/test*/**/browser/",
29 const mochitestTestPaths = [
30   // Note: we do not want to match testing/mochitest as that would apply
31   // too many globals for that directory.
32   "**/test/mochitest/",
33   "**/tests/mochitest/",
34   "testing/mochitest/tests/SimpleTest/",
35   "testing/mochitest/tests/Harness_sanity/",
38 const chromeTestPaths = [
39   "**/test*/chrome/",
42 const ignorePatterns = [
43   ...fs.readFileSync(
44       path.join(__dirname, "tools", "rewriting", "ThirdPartyPaths.txt")
45     )
46     .toString("utf-8")
47     .split("\n"),
48   ...fs.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   ignorePatterns,
59   // Ignore eslint configurations in parent directories.
60   "root": true,
61   // New rules and configurations should generally be added in
62   // tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js to
63   // allow external repositories that use the plugin to pick them up as well.
64   "extends": [
65     "plugin:mozilla/recommended"
66   ],
67   "plugins": [
68     "mozilla"
69   ],
70   "overrides": [{
71     "files": [
72       "*.html",
73       "*.xhtml",
74       "*.xul",
75       "*.xml",
76       "js/src/builtin/**/*.js",
77       "js/src/shell/**/*.js"
78     ],
79     "rules": {
80       // Curly brackets are required for all the tree via recommended.js,
81       // however these files aren't auto-fixable at the moment.
82       "curly": "off"
83     },
84   }, {
85     // TODO: Bug 1515949. Enable no-undef for gfx/
86     "files": "gfx/layers/apz/test/mochitest/**",
87     "rules": {
88       "no-undef": "off",
89     }
90   }, {
91     ...removeOverrides(xpcshellTestConfig),
92     "files": xpcshellTestPaths.map(path => `${path}**`),
93     "excludedFiles": "devtools/**"
94   }, {
95     // If it is an xpcshell head file, we turn off global unused variable checks, as it
96     // would require searching the other test files to know if they are used or not.
97     // This would be expensive and slow, and it isn't worth it for head files.
98     // We could get developers to declare as exported, but that doesn't seem worth it.
99     "files": xpcshellTestPaths.map(path => `${path}head*.js`),
100     "rules": {
101       "no-unused-vars": ["error", {
102         "args": "none",
103         "vars": "local",
104       }],
105     },
106   }, {
107     ...browserTestConfig,
108     "files": browserTestPaths.map(path => `${path}**`),
109     "excludedFiles": "devtools/**"
110   }, {
111     ...removeOverrides(mochitestTestConfig),
112     "files": mochitestTestPaths.map(path => `${path}**`),
113     "excludedFiles": [
114       "devtools/**",
115       "security/manager/ssl/tests/mochitest/browser/**",
116     ],
117   }, {
118     ...removeOverrides(chromeTestConfig),
119     "files": chromeTestPaths.map(path => `${path}**`),
120     "excludedFiles": [
121       "devtools/**",
122     ],
123   }, {
124     "env": {
125       // Ideally we wouldn't be using the simpletest env here, but our uses of
126       // js files mean we pick up everything from the global scope, which could
127       // be any one of a number of html files. So we just allow the basics...
128       "mozilla/simpletest": true,
129     },
130     "files": [
131       ...mochitestTestPaths.map(path => `${path}/**/*.js`),
132       ...chromeTestPaths.map(path => `${path}/**/*.js`),
133     ],
134   }, {
135     "files": [
136       "netwerk/cookie/test/browser/**",
137       "netwerk/test/browser/**",
138       "netwerk/test/mochitests/**",
139       "netwerk/test/unit*/**",
140     ],
141     "rules": {
142       "mozilla/consistent-if-bracing": "off",
143       "mozilla/reject-importGlobalProperties": "off",
144       "mozilla/no-arbitrary-setTimeout": "off",
145       "mozilla/no-define-cc-etc": "off",
146       "mozilla/use-default-preference-values": "off",
147       "mozilla/use-services": "off",
148       "consistent-return": "off",
149       "no-array-constructor": "off",
150       "no-eval": "off",
151       "no-global-assign": "off",
152       "no-nested-ternary": "off",
153       "no-new-wrappers": "off",
154       "no-redeclare": "off",
155       "no-return-await": "off",
156       "no-sequences": "off",
157       "no-shadow": "off",
158       "no-throw-literal": "off",
159       "no-undef": "off",
160       "no-unreachable": "off",
161       "no-unused-vars": "off",
162       "no-useless-return": "off",
163     }
164   }, {
165     "files": [
166       "layout/**",
167     ],
168     "rules": {
169       "object-shorthand": "off",
170       "mozilla/avoid-removeChild": "off",
171       "mozilla/consistent-if-bracing": "off",
172       "mozilla/reject-importGlobalProperties": "off",
173       "mozilla/no-arbitrary-setTimeout": "off",
174       "mozilla/no-define-cc-etc": "off",
175       "mozilla/no-useless-parameters": "off",
176       "mozilla/no-useless-removeEventListener": "off",
177       "mozilla/use-chromeutils-generateqi": "off",
178       "mozilla/use-default-preference-values": "off",
179       "mozilla/use-includes-instead-of-indexOf": "off",
180       "mozilla/use-services": "off",
181       "mozilla/use-ownerGlobal": "off",
182       "complexity": "off",
183       "consistent-return": "off",
184       "no-array-constructor": "off",
185       "no-caller": "off",
186       "no-cond-assign": "off",
187       "no-extra-boolean-cast": "off",
188       "no-eval": "off",
189       "no-func-assign": "off",
190       "no-global-assign": "off",
191       "no-implied-eval": "off",
192       "no-lonely-if": "off",
193       "no-nested-ternary": "off",
194       "no-new-wrappers": "off",
195       "no-redeclare": "off",
196       "no-restricted-globals": "off",
197       "no-return-await": "off",
198       "no-sequences": "off",
199       "no-shadow": "off",
200       "no-throw-literal": "off",
201       "no-useless-concat": "off",
202       "no-undef": "off",
203       "no-unreachable": "off",
204       "no-unsanitized/method": "off",
205       "no-unsanitized/property": "off",
206       "no-unsafe-negation": "off",
207       "no-unused-vars": "off",
208       "no-useless-return": "off",
209     }
210   }, {
211     "files": [
212       "dom/animation/**",
213       "dom/base/test/*.*",
214       "dom/base/test/unit/test_serializers_entities*.js",
215       "dom/base/test/unit_ipc/**",
216       "dom/base/test/jsmodules/**",
217       "dom/base/*.*",
218       "dom/canvas/**",
219       "dom/encoding/**",
220       "dom/events/**",
221       "dom/fetch/**",
222       "dom/file/**",
223       "dom/html/**",
224       "dom/jsurl/**",
225       "dom/media/tests/**",
226       "dom/media/webaudio/**",
227       "dom/media/webspeech/**",
228       "dom/messagechannel/**",
229       "dom/midi/**",
230       "dom/network/**",
231       "dom/payments/**",
232       "dom/performance/**",
233       "dom/permission/**",
234       "dom/quota/**",
235       "dom/security/test/cors/**",
236       "dom/security/test/csp/**",
237       "dom/security/test/general/**",
238       "dom/security/test/mixedcontentblocker/**",
239       "dom/security/test/sri/**",
240       "dom/security/test/referrer-policy/**",
241       "dom/serviceworkers/**",
242       "dom/smil/**",
243       "dom/tests/mochitest/**",
244       "dom/u2f/**",
245       "dom/vr/**",
246       "dom/webauthn/**",
247       "dom/webgpu/**",
248       "dom/websocket/**",
249       "dom/workers/**",
250       "dom/worklet/**",
251       "dom/xml/**",
252       "dom/xslt/**",
253       "dom/xul/**",
254       "dom/ipc/test.xhtml",
255     ],
256     "rules": {
257       "consistent-return": "off",
258       "mozilla/avoid-removeChild": "off",
259       "mozilla/consistent-if-bracing": "off",
260       "mozilla/no-arbitrary-setTimeout": "off",
261       "mozilla/no-compare-against-boolean-literals": "off",
262       "mozilla/no-define-cc-etc": "off",
263       "mozilla/reject-importGlobalProperties": "off",
264       "mozilla/use-cc-etc": "off",
265       "mozilla/use-chromeutils-generateqi": "off",
266       "mozilla/use-chromeutils-import": "off",
267       "mozilla/use-includes-instead-of-indexOf": "off",
268       "mozilla/use-ownerGlobal": "off",
269       "mozilla/use-services": "off",
270       "no-array-constructor": "off",
271       "no-caller": "off",
272       "no-cond-assign": "off",
273       "no-control-regex": "off",
274       "no-debugger": "off",
275       "no-else-return": "off",
276       "no-empty": "off",
277       "no-eval": "off",
278       "no-func-assign": "off",
279       "no-global-assign": "off",
280       "no-implied-eval": "off",
281       "no-lone-blocks": "off",
282       "no-lonely-if": "off",
283       "no-nested-ternary": "off",
284       "no-new-object": "off",
285       "no-new-wrappers": "off",
286       "no-octal": "off",
287       "no-redeclare": "off",
288       "no-return-await": "off",
289       "no-restricted-globals": "off",
290       "no-self-assign": "off",
291       "no-self-compare": "off",
292       "no-sequences": "off",
293       "no-shadow": "off",
294       "no-shadow-restricted-names": "off",
295       "no-sparse-arrays": "off",
296       "no-throw-literal": "off",
297       "no-unreachable": "off",
298       "no-unsanitized/method": "off",
299       "no-unsanitized/property": "off",
300       "no-undef": "off",
301       "no-unused-vars": "off",
302       "no-useless-call": "off",
303       "no-useless-concat": "off",
304       "no-useless-return": "off",
305       "no-with": "off",
306     }
307   }, {
308     "files": [
309       "dom/l10n/tests/mochitest/document_l10n/non-system-principal/test.html",
310       "dom/payments/test/test_basiccard.html",
311       "dom/payments/test/test_bug1478740.html",
312       "dom/payments/test/test_canMakePayment.html",
313       "dom/payments/test/test_closePayment.html",
314       "dom/payments/test/test_showPayment.html",
315       "dom/tests/browser/browser_persist_cookies.js",
316       "dom/tests/browser/browser_persist_mixed_content_image.js",
317       "netwerk/test/unit/test_http2-proxy.js",
318     ],
319     "rules": {
320       "no-async-promise-executor": "off",
321     }
322   }, {
323     "files": [
324       "browser/base/content/test/chrome/test_aboutCrashed.xhtml",
325       "browser/base/content/test/chrome/test_aboutRestartRequired.xhtml",
326       "browser/base/content/test/general/browser_tab_dragdrop2_frame1.xhtml",
327       "browser/components/places/tests/chrome/test_0_bug510634.xhtml",
328       "browser/components/places/tests/chrome/test_bug1163447_selectItems_through_shortcut.xhtml",
329       "browser/components/places/tests/chrome/test_0_bug510634.xhtml",
330       "browser/components/places/tests/chrome/test_bug1163447_selectItems_through_shortcut.xhtml",
331       "browser/components/places/tests/chrome/test_bug549192.xhtml",
332       "browser/components/places/tests/chrome/test_bug549491.xhtml",
333       "browser/components/places/tests/chrome/test_selectItems_on_nested_tree.xhtml",
334       "browser/components/places/tests/chrome/test_treeview_date.xhtml",
335     ],
336     "rules": {
337       "mozilla/no-arbitrary-setTimeout": "off",
338       "object-shorthand": "off",
339       "no-undef": "off",
340       "no-unused-vars": "off",
341     }
342   }, {
343     "files": [
344       "accessible/tests/mochitest/actions/test_keys_menu.xhtml",
345       "accessible/tests/mochitest/elm/test_listbox.xhtml",
346       "accessible/tests/mochitest/events/test_focus_autocomplete.xhtml",
347       "accessible/tests/mochitest/events/test_focus_contextmenu.xhtml",
348       "accessible/tests/mochitest/events/test_tree.xhtml",
349       "accessible/tests/mochitest/hittest/test_zoom_tree.xhtml",
350       "accessible/tests/mochitest/name/test_general.xhtml",
351       "accessible/tests/mochitest/name/test_tree.xhtml",
352       "accessible/tests/mochitest/selectable/test_listbox.xhtml",
353       "accessible/tests/mochitest/states/test_expandable.xhtml",
354       "accessible/tests/mochitest/tree/test_button.xhtml",
355       "accessible/tests/mochitest/tree/test_tree.xhtml",
356       "accessible/tests/mochitest/treeupdate/test_contextmenu.xhtml",
357       "accessible/tests/mochitest/treeupdate/test_menu.xhtml",
358     ],
359     "rules": {
360       "object-shorthand": "off",
361       "mozilla/no-compare-against-boolean-literals": "off",
362       "mozilla/use-cc-etc": "off",
363       "consistent-return": "off",
364       "no-redeclare": "off",
365       "no-sequences": "off",
366       "no-shadow": "off",
367       "no-unused-vars": "off",
368       "no-useless-call": "off",
369     }
370   }, {
371     "files": [
372       "testing/mochitest/browser-harness.xhtml",
373       "testing/mochitest/chrome/test_chromeGetTestFile.xhtml",
374       "testing/mochitest/chrome/test_sanityEventUtils.xhtml",
375       "testing/mochitest/chrome/test_sanityException.xhtml",
376       "testing/mochitest/chrome/test_sanityException2.xhtml",
377       "testing/mochitest/harness.xhtml",
378     ],
379     "rules": {
380       "dot-notation": "off",
381       "object-shorthand": "off",
382       "mozilla/use-services": "off",
383       "mozilla/no-compare-against-boolean-literals": "off",
384       "mozilla/no-useless-parameters": "off",
385       "mozilla/no-useless-removeEventListener": "off",
386       "mozilla/use-cc-etc": "off",
387       "consistent-return": "off",
388       "no-fallthrough": "off",
389       "no-nested-ternary": "off",
390       "no-redeclare": "off",
391       "no-sequences": "off",
392       "no-shadow": "off",
393       "no-throw-literal": "off",
394       "no-undef": "off",
395       "no-unsanitized/property": "off",
396       "no-unused-vars": "off",
397       "no-useless-call": "off",
398     }
399   }, {
400     "files": [
401       "docshell/test/chrome/bug113934_window.xhtml",
402       "docshell/test/chrome/bug215405_window.xhtml",
403       "docshell/test/chrome/bug293235_window.xhtml",
404       "docshell/test/chrome/bug294258_window.xhtml",
405       "docshell/test/chrome/bug298622_window.xhtml",
406       "docshell/test/chrome/bug301397_window.xhtml",
407       "docshell/test/chrome/bug303267_window.xhtml",
408       "docshell/test/chrome/bug311007_window.xhtml",
409       "docshell/test/chrome/bug321671_window.xhtml",
410       "docshell/test/chrome/bug360511_window.xhtml",
411       "docshell/test/chrome/bug396519_window.xhtml",
412       "docshell/test/chrome/bug396649_window.xhtml",
413       "docshell/test/chrome/bug449778_window.xhtml",
414       "docshell/test/chrome/bug449780_window.xhtml",
415       "docshell/test/chrome/bug582176_window.xhtml",
416       "docshell/test/chrome/bug662200_window.xhtml",
417       "docshell/test/chrome/bug690056_window.xhtml",
418       "docshell/test/chrome/bug89419_window.xhtml",
419       "docshell/test/chrome/mozFrameType_window.xhtml",
420       "docshell/test/chrome/test_bug453650.xhtml",
421       "docshell/test/chrome/test_bug454235.xhtml",
422       "docshell/test/chrome/test_bug565388.xhtml",
423       "docshell/test/chrome/test_bug608669.xhtml",
424       "docshell/test/chrome/test_bug789773.xhtml",
425       "docshell/test/chrome/test_bug846906.xhtml",
426       "docshell/test/chrome/test_docRedirect.xhtml",
427       "docshell/test/chrome/test_principalInherit.xhtml",
428       "docshell/test/chrome/test_viewsource_forbidden_in_iframe.xhtml",
429     ],
430     "rules": {
431       "dot-notation": "off",
432       "no-global-assign": "off",
433       "no-octal": "off",
434       "object-shorthand": "off",
435       "mozilla/consistent-if-bracing": "off",
436       "mozilla/no-compare-against-boolean-literals": "off",
437       "mozilla/no-useless-parameters": "off",
438       "mozilla/no-useless-removeEventListener": "off",
439       "mozilla/use-cc-etc": "off",
440       "mozilla/use-services": "off",
441       "mozilla/use-chromeutils-generateqi": "off",
442       "consistent-return": "off",
443       "no-delete-var": "off",
444       "no-redeclare": "off",
445       "no-sequences": "off",
446       "no-shadow": "off",
447       "no-undef": "off",
448       "no-unused-vars": "off",
449       "no-useless-call": "off",
450     }
451   }, {
452     "files": [
453       "editor/composer/test/test_bug434998.xhtml",
454       "editor/libeditor/tests/test_bug607584.xhtml",
455       "editor/libeditor/tests/test_bug616590.xhtml",
456       "editor/libeditor/tests/test_bug780908.xhtml",
457     ],
458     "rules": {
459       "object-shorthand": "off",
460       "no-undef": "off",
461     }
462   }, {
463     "files": [
464       "widget/tests/native_menus_window.xhtml",
465       "widget/tests/native_mouse_mac_window.xhtml",
466       "widget/tests/standalone_native_menu_window.xhtml",
467       "widget/tests/system_font_changes.xhtml",
468       "widget/tests/taskbar_previews.xhtml",
469       "widget/tests/test_bug1123480.xhtml",
470       "widget/tests/test_bug343416.xhtml",
471       "widget/tests/test_bug428405.xhtml",
472       "widget/tests/test_bug429954.xhtml",
473       "widget/tests/test_bug466599.xhtml",
474       "widget/tests/test_bug485118.xhtml",
475       "widget/tests/test_bug517396.xhtml",
476       "widget/tests/test_bug538242.xhtml",
477       "widget/tests/test_bug596600.xhtml",
478       "widget/tests/test_bug673301.xhtml",
479       "widget/tests/test_bug760802.xhtml",
480       "widget/tests/test_chrome_context_menus_win.xhtml",
481       "widget/tests/test_clipboard.xhtml",
482       "widget/tests/test_input_events_on_deactive_window.xhtml",
483       "widget/tests/test_key_event_counts.xhtml",
484       "widget/tests/test_keycodes.xhtml",
485       "widget/tests/test_panel_mouse_coords.xhtml",
486       "widget/tests/test_position_on_resize.xhtml",
487       "widget/tests/test_sizemode_events.xhtml",
488       "widget/tests/test_taskbar_progress.xhtml",
489       "widget/tests/test_transferable_overflow.xhtml",
490       "widget/tests/window_bug429954.xhtml",
491       "widget/tests/window_bug478536.xhtml",
492       "widget/tests/window_composition_text_querycontent.xhtml",
493       "widget/tests/window_state_windows.xhtml",
494       "widget/tests/window_wheeltransaction.xhtml",
495     ],
496     "rules": {
497       "complexity": "off",
498       "consistent-return": "off",
499       "dot-notation": "off",
500       "mozilla/prefer-boolean-length-check": "off",
501       "mozilla/no-useless-parameters": "off",
502       "mozilla/no-useless-removeEventListener": "off",
503       "mozilla/use-cc-etc": "off",
504       "mozilla/use-chromeutils-generateqi": "off",
505       "mozilla/use-services": "off",
506       "object-shorthand": "off",
507       "no-caller": "off",
508       "no-delete-var": "off",
509       "no-nested-ternary": "off",
510       "no-new-object": "off",
511       "no-redeclare": "off",
512       "no-sequences": "off",
513       "no-shadow": "off",
514       "no-undef": "off",
515       "no-unsafe-finally": "off",
516       "no-unsanitized/property": "off",
517       "no-unused-vars": "off",
518       "no-useless-return": "off",
519     }
520   }, {
521     "files": [
522       "dom/base/test/chrome/cpows_parent.xhtml",
523       "dom/base/test/chrome/file_bug1139964.xhtml",
524       "dom/base/test/chrome/file_bug549682.xhtml",
525       "dom/base/test/chrome/file_bug616841.xhtml",
526       "dom/base/test/chrome/file_bug990812-1.xhtml",
527       "dom/base/test/chrome/file_bug990812-2.xhtml",
528       "dom/base/test/chrome/file_bug990812-3.xhtml",
529       "dom/base/test/chrome/file_bug990812-4.xhtml",
530       "dom/base/test/chrome/file_bug990812-5.xhtml",
531       "dom/base/test/chrome/file_bug990812.xhtml",
532       "dom/base/test/chrome/test_bug1098074_throw_from_ReceiveMessage.xhtml",
533       "dom/base/test/chrome/test_bug339494.xhtml",
534       "dom/base/test/chrome/test_bug429785.xhtml",
535       "dom/base/test/chrome/test_bug467123.xhtml",
536       "dom/base/test/chrome/test_bug683852.xhtml",
537       "dom/base/test/chrome/test_bug780529.xhtml",
538       "dom/base/test/chrome/test_bug800386.xhtml",
539       "dom/base/test/chrome/test_bug884693.xhtml",
540       "dom/base/test/chrome/test_document-element-inserted.xhtml",
541       "dom/base/test/chrome/test_domparsing.xhtml",
542       "dom/base/test/chrome/test_fileconstructor.xhtml",
543       "dom/base/test/chrome/title_window.xhtml",
544       "dom/base/test/chrome/window_nsITextInputProcessor.xhtml",
545       "dom/base/test/chrome/window_swapFrameLoaders.xhtml",
546       "dom/base/test/test_domrequesthelper.xhtml",
547       "dom/bindings/test/test_bug1123516_maplikesetlikechrome.xhtml",
548       "dom/console/tests/test_jsm.xhtml",
549       "dom/events/test/test_bug1412775.xhtml",
550       "dom/events/test/test_bug336682_2.xhtml",
551       "dom/events/test/test_bug415498.xhtml",
552       "dom/events/test/test_bug602962.xhtml",
553       "dom/events/test/test_bug617528.xhtml",
554       "dom/events/test/test_bug679494.xhtml",
555       "dom/indexedDB/test/test_globalObjects_chrome.xhtml",
556       "dom/indexedDB/test/test_wrappedArray.xhtml",
557       "dom/ipc/test.xhtml",
558       "dom/ipc/tests/test_process_error.xhtml",
559       "dom/notification/test/chrome/test_notification_system_principal.xhtml",
560       "dom/plugins/test/mochitest/test_busy_hang.xhtml",
561       "dom/plugins/test/mochitest/test_convertpoint.xhtml",
562       "dom/plugins/test/mochitest/test_crash_notify.xhtml",
563       "dom/plugins/test/mochitest/test_crash_notify_no_report.xhtml",
564       "dom/plugins/test/mochitest/test_crash_submit.xhtml",
565       "dom/plugins/test/mochitest/test_hang_submit.xhtml",
566       "dom/plugins/test/mochitest/test_hangui.xhtml",
567       "dom/plugins/test/mochitest/test_idle_hang.xhtml",
568       "dom/plugins/test/mochitest/test_xulbrowser_plugin_visibility.xhtml",
569       "dom/plugins/test/mochitest/xulbrowser_plugin_visibility.xhtml",
570       "dom/security/test/general/test_bug1277803.xhtml",
571       "dom/serviceworkers/test/test_serviceworkerinfo.xhtml",
572       "dom/serviceworkers/test/test_serviceworkermanager.xhtml",
573       "dom/system/tests/test_constants.xhtml",
574       "dom/tests/mochitest/chrome/DOMWindowCreated_chrome.xhtml",
575       "dom/tests/mochitest/chrome/MozDomFullscreen_chrome.xhtml",
576       "dom/tests/mochitest/chrome/sizemode_attribute.xhtml",
577       "dom/tests/mochitest/chrome/test_cyclecollector.xhtml",
578       "dom/tests/mochitest/chrome/test_docshell_swap.xhtml",
579       "dom/tests/mochitest/chrome/window_focus.xhtml",
580       "dom/url/tests/test_bug883784.xhtml",
581       "dom/workers/test/test_WorkerDebugger.xhtml",
582       "dom/workers/test/test_WorkerDebugger_console.xhtml",
583       "dom/workers/test/test_fileReadSlice.xhtml",
584       "dom/workers/test/test_fileReaderSync.xhtml",
585       "dom/workers/test/test_fileSlice.xhtml",
586     ],
587     "rules": {
588       "mozilla/no-useless-parameters": "off",
589       "mozilla/no-useless-removeEventListener": "off",
590       "mozilla/use-chromeutils-generateqi": "off",
591       "mozilla/use-services": "off",
592       "complexity": "off",
593       "no-array-constructor": "off",
594       "no-caller": "off",
595       "no-empty": "off",
596       "no-eval": "off",
597       "no-lone-blocks": "off",
598       "no-octal": "off",
599       "no-redeclare": "off",
600       "no-shadow": "off",
601       "no-throw-literal": "off",
602       "no-undef": "off",
603       "no-unsanitized/method": "off",
604       "no-unused-vars": "off",
605       "no-useless-return": "off",
606       "object-shorthand": "off",
607     }
608   }, {
609     "files": [
610       "toolkit/components/aboutmemory/tests/test_aboutmemory.xhtml",
611       "toolkit/components/aboutmemory/tests/test_aboutmemory2.xhtml",
612       "toolkit/components/aboutmemory/tests/test_aboutmemory3.xhtml",
613       "toolkit/components/aboutmemory/tests/test_aboutmemory4.xhtml",
614       "toolkit/components/aboutmemory/tests/test_aboutmemory5.xhtml",
615       "toolkit/components/aboutmemory/tests/test_aboutmemory7.xhtml",
616       "toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xhtml",
617       "toolkit/components/aboutmemory/tests/test_memoryReporters.xhtml",
618       "toolkit/components/aboutmemory/tests/test_memoryReporters2.xhtml",
619       "toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xhtml",
620       "toolkit/components/ctypes/tests/chrome/test_ctypes.xhtml",
621       "toolkit/components/osfile/tests/mochi/test_osfile_back.xhtml",
622       "toolkit/components/osfile/tests/mochi/test_osfile_comms.xhtml",
623       "toolkit/components/osfile/tests/mochi/test_osfile_front.xhtml",
624       "toolkit/components/places/tests/chrome/browser_disableglobalhistory.xhtml",
625       "toolkit/components/places/tests/chrome/test_browser_disableglobalhistory.xhtml",
626       "toolkit/components/places/tests/chrome/test_favicon_annotations.xhtml",
627       "toolkit/components/workerloader/tests/test_loading.xhtml",
628       "toolkit/content/tests/chrome/bug263683_window.xhtml",
629       "toolkit/content/tests/chrome/bug304188_window.xhtml",
630       "toolkit/content/tests/chrome/bug331215_window.xhtml",
631       "toolkit/content/tests/chrome/bug360437_window.xhtml",
632       "toolkit/content/tests/chrome/bug366992_window.xhtml",
633       "toolkit/content/tests/chrome/bug409624_window.xhtml",
634       "toolkit/content/tests/chrome/bug429723_window.xhtml",
635       "toolkit/content/tests/chrome/bug451540_window.xhtml",
636       "toolkit/content/tests/chrome/dialog_dialogfocus.xhtml",
637       "toolkit/content/tests/chrome/findbar_entireword_window.xhtml",
638       "toolkit/content/tests/chrome/findbar_events_window.xhtml",
639       "toolkit/content/tests/chrome/findbar_window.xhtml",
640       "toolkit/content/tests/chrome/frame_popup_anchor.xhtml",
641       "toolkit/content/tests/chrome/frame_subframe_origin_subframe1.xhtml",
642       "toolkit/content/tests/chrome/frame_subframe_origin_subframe2.xhtml",
643       "toolkit/content/tests/chrome/test_arrowpanel.xhtml",
644       "toolkit/content/tests/chrome/test_autocomplete2.xhtml",
645       "toolkit/content/tests/chrome/test_autocomplete3.xhtml",
646       "toolkit/content/tests/chrome/test_autocomplete4.xhtml",
647       "toolkit/content/tests/chrome/test_autocomplete5.xhtml",
648       "toolkit/content/tests/chrome/test_autocomplete_emphasis.xhtml",
649       "toolkit/content/tests/chrome/test_autocomplete_mac_caret.xhtml",
650       "toolkit/content/tests/chrome/test_autocomplete_placehold_last_complete.xhtml",
651       "toolkit/content/tests/chrome/test_browser_drop.xhtml",
652       "toolkit/content/tests/chrome/test_bug1048178.xhtml",
653       "toolkit/content/tests/chrome/test_bug382990.xhtml",
654       "toolkit/content/tests/chrome/test_bug437844.xhtml",
655       "toolkit/content/tests/chrome/test_bug624329.xhtml",
656       "toolkit/content/tests/chrome/test_bug792324.xhtml",
657       "toolkit/content/tests/chrome/test_contextmenu_list.xhtml",
658       "toolkit/content/tests/chrome/test_cursorsnap.xhtml",
659       "toolkit/content/tests/chrome/test_dialogfocus.xhtml",
660       "toolkit/content/tests/chrome/test_hiddenitems.xhtml",
661       "toolkit/content/tests/chrome/test_hiddenpaging.xhtml",
662       "toolkit/content/tests/chrome/test_maximized_persist.xhtml",
663       "toolkit/content/tests/chrome/test_menu.xhtml",
664       "toolkit/content/tests/chrome/test_menuitem_blink.xhtml",
665       "toolkit/content/tests/chrome/test_menulist.xhtml",
666       "toolkit/content/tests/chrome/test_menulist_keynav.xhtml",
667       "toolkit/content/tests/chrome/test_mousescroll.xhtml",
668       "toolkit/content/tests/chrome/test_mozinputbox_dictionary.xhtml",
669       "toolkit/content/tests/chrome/test_notificationbox.xhtml",
670       "toolkit/content/tests/chrome/test_panel_focus.xhtml",
671       "toolkit/content/tests/chrome/test_popup_keys.xhtml",
672       "toolkit/content/tests/chrome/test_popup_scaled.xhtml",
673       "toolkit/content/tests/chrome/test_popupincontent.xhtml",
674       "toolkit/content/tests/chrome/test_popupremoving.xhtml",
675       "toolkit/content/tests/chrome/test_popupremoving_frame.xhtml",
676       "toolkit/content/tests/chrome/test_position.xhtml",
677       "toolkit/content/tests/chrome/test_preferences.xhtml",
678       "toolkit/content/tests/chrome/test_richlistbox.xhtml",
679       "toolkit/content/tests/chrome/test_righttoleft.xhtml",
680       "toolkit/content/tests/chrome/test_screenPersistence.xhtml",
681       "toolkit/content/tests/chrome/test_scrollbar.xhtml",
682       "toolkit/content/tests/chrome/test_showcaret.xhtml",
683       "toolkit/content/tests/chrome/test_tabbox.xhtml",
684       "toolkit/content/tests/chrome/test_textbox_search.xhtml",
685       "toolkit/content/tests/chrome/test_tree_view.xhtml",
686       "toolkit/content/tests/chrome/window_browser_drop.xhtml",
687       "toolkit/content/tests/chrome/window_cursorsnap_dialog.xhtml",
688       "toolkit/content/tests/chrome/window_cursorsnap_wizard.xhtml",
689       "toolkit/content/tests/chrome/window_keys.xhtml",
690       "toolkit/content/tests/chrome/window_largemenu.xhtml",
691       "toolkit/content/tests/chrome/window_panel.xhtml",
692       "toolkit/content/tests/chrome/window_panel_anchoradjust.xhtml",
693       "toolkit/content/tests/chrome/window_popup_preventdefault_chrome.xhtml",
694       "toolkit/content/tests/chrome/window_preferences.xhtml",
695       "toolkit/content/tests/chrome/window_preferences3.xhtml",
696       "toolkit/content/tests/chrome/window_preferences_beforeaccept.xhtml",
697       "toolkit/content/tests/chrome/window_preferences_commandretarget.xhtml",
698       "toolkit/content/tests/chrome/window_preferences_onsyncfrompreference.xhtml",
699       "toolkit/content/tests/chrome/window_subframe_origin.xhtml",
700       "toolkit/content/tests/chrome/window_titlebar.xhtml",
701       "toolkit/content/tests/chrome/window_tooltip.xhtml",
702       "toolkit/content/tests/widgets/test_contextmenu_menugroup.xhtml",
703       "toolkit/content/tests/widgets/test_contextmenu_nested.xhtml",
704       "toolkit/content/tests/widgets/test_editor_currentURI.xhtml",
705       "toolkit/content/tests/widgets/test_popupanchor.xhtml",
706       "toolkit/content/tests/widgets/test_popupreflows.xhtml",
707       "toolkit/content/tests/widgets/window_menubar.xhtml",
708       "toolkit/modules/tests/chrome/test_bug544442_checkCert.xhtml",
709       "toolkit/profile/test/test_create_profile.xhtml",
710     ],
711     "rules": {
712       "object-shorthand": "off",
713       "consistent-return": "off",
714       "mozilla/consistent-if-bracing": "off",
715       "mozilla/no-compare-against-boolean-literals": "off",
716       "mozilla/no-useless-parameters": "off",
717       "mozilla/no-useless-removeEventListener": "off",
718       "mozilla/prefer-boolean-length-check": "off",
719       "mozilla/use-cc-etc": "off",
720       "mozilla/use-chromeutils-generateqi": "off",
721       "mozilla/use-chromeutils-import": "off",
722       "mozilla/use-default-preference-values": "off",
723       "mozilla/use-services": "off",
724       "no-caller": "off",
725       "no-else-return": "off",
726       "no-eval": "off",
727       "no-fallthrough": "off",
728       "no-irregular-whitespace": "off",
729       "no-lonely-if": "off",
730       "no-nested-ternary": "off",
731       "no-redeclare": "off",
732       "no-sequences": "off",
733       "no-shadow": "off",
734       "no-throw-literal": "off",
735       "no-undef": "off",
736       "no-unneeded-ternary": "off",
737       "no-unused-vars": "off",
738       "no-useless-concat": "off",
739       "no-useless-return": "off",
740     }
741   }, {
742     "files": [
743       "accessible/**",
744       "devtools/**",
745       "dom/**",
746       "docshell/**",
747       "editor/libeditor/tests/**",
748       "editor/spellchecker/tests/test_bug338427.html",
749       "gfx/**",
750       "image/test/browser/browser_image.js",
751       "js/src/builtin/**",
752       "layout/**",
753       "mobile/android/**",
754       "modules/**",
755       "netwerk/**",
756       "remote/**",
757       "security/manager/**",
758       "services/**",
759       "storage/test/unit/test_vacuum.js",
760       "taskcluster/docker/periodic-updates/scripts/**",
761       "testing/**",
762       "tools/**",
763       "widget/tests/test_assign_event_data.html",
764     ],
765     "rules": {
766       "mozilla/prefer-boolean-length-check": "off",
767     }
768   }, {
769     // TODO: Bug 1609271 Fix all violations for ChromeUtils.import(..., null)
770     "files": [
771       "browser/base/content/test/forms/head.js",
772       "browser/base/content/test/general/browser_datachoices_notification.js",
773       "browser/base/content/test/plugins/head.js",
774       "browser/base/content/test/sync/browser_fxa_web_channel.js",
775       "browser/base/content/test/webextensions/head.js",
776       "browser/components/customizableui/test/browser_1042100_default_placements_update.js",
777       "browser/components/customizableui/test/browser_1096763_seen_widgets_post_reset.js",
778       "browser/components/customizableui/test/browser_1161838_inserted_new_default_buttons.js",
779       "browser/components/customizableui/test/browser_989338_saved_placements_not_resaved.js",
780       "browser/components/customizableui/test/browser_currentset_post_reset.js",
781       "browser/components/customizableui/test/browser_panel_keyboard_navigation.js",
782       "browser/components/enterprisepolicies/tests/browser/browser_policies_setAndLockPref_API.js",
783       "browser/components/enterprisepolicies/tests/browser/head.js",
784       "browser/components/enterprisepolicies/tests/xpcshell/head.js",
785       "browser/components/enterprisepolicies/tests/xpcshell/test_proxy.js",
786       "browser/components/enterprisepolicies/tests/xpcshell/test_runOnce_helper.js",
787       "browser/components/extensions/test/browser/browser_ext_browserAction_context.js",
788       "browser/components/extensions/test/browser/browser_ext_browserAction_popup.js",
789       "browser/components/extensions/test/browser/browser_ext_browserAction_popup_preload.js",
790       "browser/components/extensions/test/browser/browser_ext_currentWindow.js",
791       "browser/components/extensions/test/browser/browser_ext_getViews.js",
792       "browser/components/extensions/test/browser/browser_ext_management.js",
793       "browser/components/extensions/test/browser/browser_ext_menus_events.js",
794       "browser/components/extensions/test/browser/browser_ext_openPanel.js",
795       "browser/components/extensions/test/browser/browser_ext_pageAction_context.js",
796       "browser/components/extensions/test/browser/browser_ext_pageAction_popup.js",
797       "browser/components/extensions/test/browser/browser_ext_pageAction_show_matches.js",
798       "browser/components/extensions/test/browser/browser_ext_sessions_getRecentlyClosed_private.js",
799       "browser/components/extensions/test/browser/browser_ext_sessions_restore.js",
800       "browser/components/extensions/test/browser/browser_ext_tabs_audio.js",
801       "browser/components/extensions/test/browser/browser_ext_tabs_create_url.js",
802       "browser/components/extensions/test/browser/browser_ext_tabs_duplicate.js",
803       "browser/components/extensions/test/browser/browser_ext_tabs_newtab_private.js",
804       "browser/components/extensions/test/browser/browser_ext_tabs_removeCSS.js",
805       "browser/components/extensions/test/browser/browser_ext_tabs_zoom.js",
806       "browser/components/extensions/test/browser/browser_ext_windows.js",
807       "browser/components/extensions/test/browser/browser_ext_windows_events.js",
808       "browser/components/extensions/test/browser/head.js",
809       "browser/components/extensions/test/browser/head_webNavigation.js",
810       "browser/components/extensions/test/xpcshell/test_ext_url_overrides_newtab.js",
811       "browser/components/migration/tests/unit/test_Edge_db_migration.js",
812       "browser/components/preferences/in-content/tests/browser_contentblocking.js",
813       "browser/components/translation/test/unit/test_cld2.js",
814       "browser/components/urlbar/tests/ext/browser/update/browser_getBrowserUpdateStatus_updateDisabledByPolicy.js",
815       "browser/extensions/doh-rollout/experiments/doorhanger/api.js",
816       "browser/extensions/doh-rollout/experiments/doorhanger/api.js",
817       "browser/extensions/doh-rollout/test/browser/browser_policyOverride.js",
818       "browser/extensions/doh-rollout/test/unit/test_localStorageMigration.js",
819       "browser/extensions/formautofill/test/unit/head.js",
820       "browser/extensions/formautofill/test/unit/test_creditCardRecords.js",
821       "browser/extensions/formautofill/test/unit/test_migrateRecords.js",
822       "browser/extensions/formautofill/test/unit/test_storage_remove.js",
823       "browser/extensions/formautofill/test/unit/test_storage_tombstones.js",
824       "browser/extensions/formautofill/test/unit/test_sync.js",
825       "browser/extensions/formautofill/test/unit/test_transformFields.js",
826       "browser/extensions/report-site-issue/experimentalAPIs/pageActionExtras.js",
827       "browser/extensions/report-site-issue/test/browser/head.js",
828       "browser/modules/test/unit/test_LiveBookmarkMigrator.js",
829       "devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_addons_debug_popup.js",
830       "dom/ipc/tests/browser_memory_distribution_telemetry.js",
831       "dom/push/test/xpcshell/head.js",
832       "dom/push/test/xpcshell/test_broadcast_success.js",
833       "dom/push/test/xpcshell/test_crypto.js",
834       "security/manager/ssl/RemoteSecuritySettings.jsm",
835       "security/manager/ssl/tests/unit/test_der.js",
836       "security/manager/ssl/X509.jsm",
837       "services/common/tests/unit/head_helpers.js",
838       "services/common/tests/unit/test_uptake_telemetry.js",
839       "services/fxaccounts/tests/xpcshell/test_accounts.js",
840       "services/fxaccounts/tests/xpcshell/test_accounts_device_registration.js",
841       "services/fxaccounts/tests/xpcshell/test_loginmgr_storage.js",
842       "services/fxaccounts/tests/xpcshell/test_oauth_token_storage.js",
843       "services/fxaccounts/tests/xpcshell/test_oauth_tokens.js",
844       "services/fxaccounts/tests/xpcshell/test_web_channel.js",
845       "services/sync/modules-testing/utils.js",
846       "services/sync/tests/unit/test_doctor.js",
847       "services/sync/tests/unit/test_postqueue.js",
848       "testing/marionette/components/marionette.js",
849       "testing/marionette/driver.js",
850       "testing/marionette/format.js",
851       "testing/marionette/server.js",
852       "testing/marionette/test/unit/test_prefs.js",
853       "testing/mochitest/browser-test.js",
854       "testing/mochitest/BrowserTestUtils/content/content-task.js",
855       "testing/xpcshell/head.js",
856       "toolkit/components/cloudstorage/tests/unit/test_cloudstorage.js",
857       "toolkit/components/crashes/tests/xpcshell/test_crash_manager.js",
858       "toolkit/components/crashes/tests/xpcshell/test_crash_service.js",
859       "toolkit/components/crashes/tests/xpcshell/test_crash_store.js",
860       "toolkit/components/enterprisepolicies/tests/browser/head.js",
861       "toolkit/components/enterprisepolicies/tests/EnterprisePolicyTesting.jsm",
862       "toolkit/components/enterprisepolicies/tests/xpcshell/head.js",
863       "toolkit/components/extensions/ExtensionPreferencesManager.jsm",
864       "toolkit/components/extensions/ExtensionXPCShellUtils.jsm",
865       "toolkit/components/extensions/ExtensionXPCShellUtils.jsm",
866       "toolkit/components/extensions/parent/ext-management.js",
867       "toolkit/components/extensions/test/mochitest/test_ext_contentscript_cache.html",
868       "toolkit/components/extensions/test/xpcshell/head_native_messaging.js",
869       "toolkit/components/extensions/test/xpcshell/test_ext_api_permissions.js",
870       "toolkit/components/extensions/test/xpcshell/test_ext_background_early_shutdown.js",
871       "toolkit/components/extensions/test/xpcshell/test_ext_background_teardown.js",
872       "toolkit/components/extensions/test/xpcshell/test_ext_contentscript_context.js",
873       "toolkit/components/extensions/test/xpcshell/test_ext_contentscript_context_isolation.js",
874       "toolkit/components/extensions/test/xpcshell/test_ext_contentscript_teardown.js",
875       "toolkit/components/extensions/test/xpcshell/test_ext_contexts_gc.js",
876       "toolkit/components/extensions/test/xpcshell/test_ext_privacy_disable.js",
877       "toolkit/components/extensions/test/xpcshell/test_ext_schemas_interactive.js",
878       "toolkit/components/extensions/test/xpcshell/test_ext_shutdown_cleanup.js",
879       "toolkit/components/extensions/test/xpcshell/test_ext_storage.js",
880       "toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js",
881       "toolkit/components/extensions/test/xpcshell/test_ext_storage_sync_crypto.js",
882       "toolkit/components/extensions/test/xpcshell/test_ext_tab_teardown.js",
883       "toolkit/components/extensions/test/xpcshell/test_native_manifests.js",
884       "toolkit/components/featuregates/test/unit/test_FeatureGate.js",
885       "toolkit/components/mozintl/mozIntl.jsm",
886       "toolkit/components/normandy/test/browser/browser_actions_ShowHeartbeatAction.js",
887       "toolkit/components/osfile/modules/osfile_async_front.jsm",
888       "toolkit/components/osfile/modules/osfile_native.jsm",
889       "toolkit/components/osfile/tests/xpcshell/test_osfile_kill.js",
890       "toolkit/components/passwordmgr/test/unit/test_getFormFields.js",
891       "toolkit/components/passwordmgr/test/unit/test_getPasswordFields.js",
892       "toolkit/components/passwordmgr/test/unit/test_getUserNameAndPasswordFields.js",
893       "toolkit/components/processsingleton/MainProcessSingleton.jsm",
894       "toolkit/components/telemetry/tests/unit/head.js",
895       "toolkit/components/telemetry/tests/unit/test_EcosystemTelemetry.js",
896       "toolkit/components/telemetry/tests/unit/test_EventPing.js",
897       "toolkit/components/telemetry/tests/unit/test_HealthPing.js",
898       "toolkit/components/telemetry/tests/unit/test_PingAPI.js",
899       "toolkit/components/telemetry/tests/unit/test_PrioPing.js",
900       "toolkit/components/telemetry/tests/unit/test_TelemetryController_idle.js",
901       "toolkit/components/telemetry/tests/unit/test_TelemetryReportingPolicy.js",
902       "toolkit/components/telemetry/tests/unit/test_TelemetrySendOldPings.js",
903       "toolkit/components/telemetry/tests/unit/test_TelemetrySession.js",
904       "toolkit/modules/subprocess/test/xpcshell/test_subprocess.js",
905       "toolkit/modules/tests/xpcshell/test_GMPInstallManager.js",
906       "toolkit/mozapps/extensions/internal/AddonTestUtils.jsm",
907       "toolkit/mozapps/extensions/test/browser/browser_gmpProvider.js",
908       "toolkit/mozapps/extensions/test/xpcshell/head_addons.js",
909       "toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_clients.js",
910       "toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_regexp_split.js",
911       "toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_targetapp_filter.js",
912       "toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_telemetry.js",
913       "toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklistchange.js",
914       "toolkit/mozapps/extensions/test/xpcshell/test_gmpProvider.js",
915       "toolkit/mozapps/extensions/test/xpcshell/test_no_addons.js",
916       "toolkit/mozapps/extensions/test/xpcshell/test_permissions_prefs.js",
917       "toolkit/mozapps/extensions/test/xpcshell/test_signed_updatepref.js",
918       "toolkit/mozapps/extensions/test/xpcshell/test_signed_verify.js",
919       "toolkit/mozapps/extensions/test/xpcshell/test_webextension.js",
920       "toolkit/mozapps/extensions/test/xpcshell/test_webextension_events.js",
921       "toolkit/mozapps/extensions/test/xpcshell/test_XPIStates.js",
922       "toolkit/mozapps/extensions/test/xpcshell/xml-blocklist/test_blocklist_gfx.js",
923       "toolkit/mozapps/extensions/test/xpcshell/xml-blocklist/test_blocklist_telemetry.js",
924       "toolkit/mozapps/extensions/test/xpcshell/xml-blocklist/test_blocklistchange.js",
925       "toolkit/mozapps/extensions/test/xpcshell/xml-blocklist/test_overrideblocklist.js",
926       "toolkit/mozapps/installer/precompile_cache.js"
927     ],
928     "rules": {
929       "mozilla/reject-chromeutils-import-null": "off",
930     }
931   }]