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