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 "**/test/mochitests/",
34 "testing/mochitest/tests/SimpleTest/",
35 "testing/mochitest/tests/Harness_sanity/",
38 const chromeTestPaths = ["**/test*/chrome/"];
40 const ignorePatterns = [
43 path.join(__dirname, "tools", "rewriting", "ThirdPartyPaths.txt")
49 path.join(__dirname, "devtools", "client", "debugger", ".eslintignore")
53 .filter(p => p && !p.startsWith("#"))
54 .map(p => `devtools/client/debugger/${p}`),
58 parser: "babel-eslint",
62 configFile: path.join(__dirname, ".babel-eslint.rc.js"),
66 // Ignore eslint configurations in parent directories.
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"],
75 // All .eslintrc.js files are in the node environment, so turn that
77 // https://github.com/eslint/eslint/issues/13008
78 files: [".eslintrc.js"],
90 "js/src/builtin/**/*.js",
91 "js/src/shell/**/*.js",
94 // Curly brackets are required for all the tree via recommended.js,
95 // however these files aren't auto-fixable at the moment.
100 // TODO: Bug 1515949. Enable no-undef for gfx/
101 files: "gfx/layers/apz/test/mochitest/**",
107 ...removeOverrides(xpcshellTestConfig),
108 files: xpcshellTestPaths.map(path => `${path}**`),
109 excludedFiles: "devtools/**",
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`),
128 ...browserTestConfig,
129 files: browserTestPaths.map(path => `${path}**`),
130 excludedFiles: "devtools/**",
133 ...removeOverrides(mochitestTestConfig),
134 files: mochitestTestPaths.map(path => `${path}**`),
137 "security/manager/ssl/tests/mochitest/browser/**",
141 ...removeOverrides(chromeTestConfig),
142 files: chromeTestPaths.map(path => `${path}**`),
143 excludedFiles: ["devtools/**"],
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,
153 ...mochitestTestPaths.map(path => `${path}/**/*.js`),
154 ...chromeTestPaths.map(path => `${path}/**/*.js`),
159 "netwerk/cookie/test/browser/**",
160 "netwerk/test/browser/**",
161 "netwerk/test/mochitests/**",
162 "netwerk/test/unit*/**",
165 "mozilla/no-arbitrary-setTimeout": "off",
166 "mozilla/no-define-cc-etc": "off",
167 "mozilla/use-services": "off",
168 "consistent-return": "off",
170 "no-global-assign": "off",
171 "no-nested-ternary": "off",
172 "no-redeclare": "off",
174 "no-throw-literal": "off",
175 "no-unused-vars": "off",
179 files: ["layout/**"],
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",
193 "consistent-return": "off",
194 "no-array-constructor": "off",
196 "no-cond-assign": "off",
197 "no-extra-boolean-cast": "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",
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",
224 "dom/base/test/unit/test_serializers_entities*.js",
225 "dom/base/test/unit_ipc/**",
226 "dom/base/test/jsmodules/**",
235 "dom/media/tests/**",
236 "dom/media/webaudio/**",
237 "dom/media/webspeech/**",
238 "dom/messagechannel/**",
242 "dom/performance/**",
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/**",
254 "dom/tests/mochitest/**",
265 "dom/ipc/test.xhtml",
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",
283 "no-cond-assign": "off",
284 "no-control-regex": "off",
285 "no-debugger": "off",
286 "no-else-return": "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",
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",
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",
312 "no-unused-vars": "off",
313 "no-useless-call": "off",
314 "no-useless-concat": "off",
315 "no-useless-return": "off",
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",
332 "no-async-promise-executor": "off",
337 "browser/base/content/test/chrome/test_aboutCrashed.xhtml",
338 "browser/base/content/test/chrome/test_aboutRestartRequired.xhtml",
339 "browser/base/content/test/general/browser_tab_dragdrop2_frame1.xhtml",
340 "browser/components/places/tests/chrome/test_0_bug510634.xhtml",
341 "browser/components/places/tests/chrome/test_bug1163447_selectItems_through_shortcut.xhtml",
342 "browser/components/places/tests/chrome/test_0_bug510634.xhtml",
343 "browser/components/places/tests/chrome/test_bug1163447_selectItems_through_shortcut.xhtml",
344 "browser/components/places/tests/chrome/test_bug549192.xhtml",
345 "browser/components/places/tests/chrome/test_bug549491.xhtml",
346 "browser/components/places/tests/chrome/test_selectItems_on_nested_tree.xhtml",
347 "browser/components/places/tests/chrome/test_treeview_date.xhtml",
350 "mozilla/no-arbitrary-setTimeout": "off",
351 "object-shorthand": "off",
353 "no-unused-vars": "off",
358 "accessible/tests/mochitest/actions/test_keys_menu.xhtml",
359 "accessible/tests/mochitest/elm/test_listbox.xhtml",
360 "accessible/tests/mochitest/events/test_focus_autocomplete.xhtml",
361 "accessible/tests/mochitest/events/test_focus_contextmenu.xhtml",
362 "accessible/tests/mochitest/events/test_tree.xhtml",
363 "accessible/tests/mochitest/hittest/test_zoom_tree.xhtml",
364 "accessible/tests/mochitest/name/test_general.xhtml",
365 "accessible/tests/mochitest/name/test_tree.xhtml",
366 "accessible/tests/mochitest/selectable/test_listbox.xhtml",
367 "accessible/tests/mochitest/states/test_expandable.xhtml",
368 "accessible/tests/mochitest/tree/test_button.xhtml",
369 "accessible/tests/mochitest/tree/test_tree.xhtml",
370 "accessible/tests/mochitest/treeupdate/test_contextmenu.xhtml",
371 "accessible/tests/mochitest/treeupdate/test_menu.xhtml",
374 "object-shorthand": "off",
375 "mozilla/no-compare-against-boolean-literals": "off",
376 "mozilla/use-cc-etc": "off",
377 "consistent-return": "off",
378 "no-redeclare": "off",
379 "no-sequences": "off",
381 "no-unused-vars": "off",
382 "no-useless-call": "off",
387 "testing/mochitest/browser-harness.xhtml",
388 "testing/mochitest/chrome/test_chromeGetTestFile.xhtml",
389 "testing/mochitest/chrome/test_sanityEventUtils.xhtml",
390 "testing/mochitest/chrome/test_sanityException.xhtml",
391 "testing/mochitest/chrome/test_sanityException2.xhtml",
392 "testing/mochitest/harness.xhtml",
395 "dot-notation": "off",
396 "object-shorthand": "off",
397 "mozilla/use-services": "off",
398 "mozilla/no-compare-against-boolean-literals": "off",
399 "mozilla/no-useless-parameters": "off",
400 "mozilla/no-useless-removeEventListener": "off",
401 "mozilla/use-cc-etc": "off",
402 "consistent-return": "off",
403 "no-fallthrough": "off",
404 "no-nested-ternary": "off",
405 "no-redeclare": "off",
406 "no-sequences": "off",
408 "no-throw-literal": "off",
410 "no-unsanitized/property": "off",
411 "no-unused-vars": "off",
412 "no-useless-call": "off",
417 "docshell/test/chrome/bug113934_window.xhtml",
418 "docshell/test/chrome/bug215405_window.xhtml",
419 "docshell/test/chrome/bug293235_window.xhtml",
420 "docshell/test/chrome/bug294258_window.xhtml",
421 "docshell/test/chrome/bug298622_window.xhtml",
422 "docshell/test/chrome/bug301397_window.xhtml",
423 "docshell/test/chrome/bug303267_window.xhtml",
424 "docshell/test/chrome/bug311007_window.xhtml",
425 "docshell/test/chrome/bug321671_window.xhtml",
426 "docshell/test/chrome/bug360511_window.xhtml",
427 "docshell/test/chrome/bug396519_window.xhtml",
428 "docshell/test/chrome/bug396649_window.xhtml",
429 "docshell/test/chrome/bug449778_window.xhtml",
430 "docshell/test/chrome/bug449780_window.xhtml",
431 "docshell/test/chrome/bug582176_window.xhtml",
432 "docshell/test/chrome/bug662200_window.xhtml",
433 "docshell/test/chrome/bug690056_window.xhtml",
434 "docshell/test/chrome/bug89419_window.xhtml",
435 "docshell/test/chrome/mozFrameType_window.xhtml",
436 "docshell/test/chrome/test_bug453650.xhtml",
437 "docshell/test/chrome/test_bug454235.xhtml",
438 "docshell/test/chrome/test_bug565388.xhtml",
439 "docshell/test/chrome/test_bug608669.xhtml",
440 "docshell/test/chrome/test_bug789773.xhtml",
441 "docshell/test/chrome/test_bug846906.xhtml",
442 "docshell/test/chrome/test_docRedirect.xhtml",
443 "docshell/test/chrome/test_principalInherit.xhtml",
444 "docshell/test/chrome/test_viewsource_forbidden_in_iframe.xhtml",
447 "dot-notation": "off",
448 "no-global-assign": "off",
450 "object-shorthand": "off",
451 "mozilla/consistent-if-bracing": "off",
452 "mozilla/no-compare-against-boolean-literals": "off",
453 "mozilla/no-useless-parameters": "off",
454 "mozilla/no-useless-removeEventListener": "off",
455 "mozilla/use-cc-etc": "off",
456 "mozilla/use-services": "off",
457 "mozilla/use-chromeutils-generateqi": "off",
458 "consistent-return": "off",
459 "no-delete-var": "off",
460 "no-redeclare": "off",
461 "no-sequences": "off",
464 "no-unused-vars": "off",
465 "no-useless-call": "off",
470 "editor/composer/test/test_bug434998.xhtml",
471 "editor/libeditor/tests/test_bug607584.xhtml",
472 "editor/libeditor/tests/test_bug616590.xhtml",
473 "editor/libeditor/tests/test_bug780908.xhtml",
476 "object-shorthand": "off",
482 "widget/tests/native_menus_window.xhtml",
483 "widget/tests/native_mouse_mac_window.xhtml",
484 "widget/tests/standalone_native_menu_window.xhtml",
485 "widget/tests/system_font_changes.xhtml",
486 "widget/tests/taskbar_previews.xhtml",
487 "widget/tests/test_bug1123480.xhtml",
488 "widget/tests/test_bug343416.xhtml",
489 "widget/tests/test_bug428405.xhtml",
490 "widget/tests/test_bug429954.xhtml",
491 "widget/tests/test_bug466599.xhtml",
492 "widget/tests/test_bug485118.xhtml",
493 "widget/tests/test_bug517396.xhtml",
494 "widget/tests/test_bug538242.xhtml",
495 "widget/tests/test_bug596600.xhtml",
496 "widget/tests/test_bug673301.xhtml",
497 "widget/tests/test_bug760802.xhtml",
498 "widget/tests/test_chrome_context_menus_win.xhtml",
499 "widget/tests/test_clipboard.xhtml",
500 "widget/tests/test_input_events_on_deactive_window.xhtml",
501 "widget/tests/test_key_event_counts.xhtml",
502 "widget/tests/test_keycodes.xhtml",
503 "widget/tests/test_panel_mouse_coords.xhtml",
504 "widget/tests/test_position_on_resize.xhtml",
505 "widget/tests/test_sizemode_events.xhtml",
506 "widget/tests/test_taskbar_progress.xhtml",
507 "widget/tests/test_transferable_overflow.xhtml",
508 "widget/tests/window_bug429954.xhtml",
509 "widget/tests/window_bug478536.xhtml",
510 "widget/tests/window_composition_text_querycontent.xhtml",
511 "widget/tests/window_state_windows.xhtml",
512 "widget/tests/window_wheeltransaction.xhtml",
516 "consistent-return": "off",
517 "dot-notation": "off",
518 "mozilla/prefer-boolean-length-check": "off",
519 "mozilla/no-useless-parameters": "off",
520 "mozilla/no-useless-removeEventListener": "off",
521 "mozilla/use-cc-etc": "off",
522 "mozilla/use-chromeutils-generateqi": "off",
523 "mozilla/use-services": "off",
524 "object-shorthand": "off",
526 "no-delete-var": "off",
527 "no-nested-ternary": "off",
528 "no-new-object": "off",
529 "no-redeclare": "off",
530 "no-sequences": "off",
533 "no-unsafe-finally": "off",
534 "no-unsanitized/property": "off",
535 "no-unused-vars": "off",
536 "no-useless-return": "off",
541 "dom/base/test/chrome/file_bug1139964.xhtml",
542 "dom/base/test/chrome/file_bug549682.xhtml",
543 "dom/base/test/chrome/file_bug616841.xhtml",
544 "dom/base/test/chrome/file_bug990812-1.xhtml",
545 "dom/base/test/chrome/file_bug990812-2.xhtml",
546 "dom/base/test/chrome/file_bug990812-3.xhtml",
547 "dom/base/test/chrome/file_bug990812-4.xhtml",
548 "dom/base/test/chrome/file_bug990812-5.xhtml",
549 "dom/base/test/chrome/file_bug990812.xhtml",
550 "dom/base/test/chrome/test_bug1098074_throw_from_ReceiveMessage.xhtml",
551 "dom/base/test/chrome/test_bug339494.xhtml",
552 "dom/base/test/chrome/test_bug429785.xhtml",
553 "dom/base/test/chrome/test_bug467123.xhtml",
554 "dom/base/test/chrome/test_bug683852.xhtml",
555 "dom/base/test/chrome/test_bug780529.xhtml",
556 "dom/base/test/chrome/test_bug800386.xhtml",
557 "dom/base/test/chrome/test_bug884693.xhtml",
558 "dom/base/test/chrome/test_document-element-inserted.xhtml",
559 "dom/base/test/chrome/test_domparsing.xhtml",
560 "dom/base/test/chrome/test_fileconstructor.xhtml",
561 "dom/base/test/chrome/title_window.xhtml",
562 "dom/base/test/chrome/window_nsITextInputProcessor.xhtml",
563 "dom/base/test/chrome/window_swapFrameLoaders.xhtml",
564 "dom/base/test/test_domrequesthelper.xhtml",
565 "dom/bindings/test/test_bug1123516_maplikesetlikechrome.xhtml",
566 "dom/console/tests/test_jsm.xhtml",
567 "dom/events/test/test_bug1412775.xhtml",
568 "dom/events/test/test_bug336682_2.xhtml",
569 "dom/events/test/test_bug415498.xhtml",
570 "dom/events/test/test_bug602962.xhtml",
571 "dom/events/test/test_bug617528.xhtml",
572 "dom/events/test/test_bug679494.xhtml",
573 "dom/indexedDB/test/test_globalObjects_chrome.xhtml",
574 "dom/indexedDB/test/test_wrappedArray.xhtml",
575 "dom/ipc/test.xhtml",
576 "dom/ipc/tests/test_process_error.xhtml",
577 "dom/notification/test/chrome/test_notification_system_principal.xhtml",
578 "dom/plugins/test/mochitest/test_busy_hang.xhtml",
579 "dom/plugins/test/mochitest/test_convertpoint.xhtml",
580 "dom/plugins/test/mochitest/test_crash_notify.xhtml",
581 "dom/plugins/test/mochitest/test_crash_notify_no_report.xhtml",
582 "dom/plugins/test/mochitest/test_crash_submit.xhtml",
583 "dom/plugins/test/mochitest/test_hang_submit.xhtml",
584 "dom/plugins/test/mochitest/test_hangui.xhtml",
585 "dom/plugins/test/mochitest/test_idle_hang.xhtml",
586 "dom/plugins/test/mochitest/test_xulbrowser_plugin_visibility.xhtml",
587 "dom/plugins/test/mochitest/xulbrowser_plugin_visibility.xhtml",
588 "dom/security/test/general/test_bug1277803.xhtml",
589 "dom/serviceworkers/test/test_serviceworkerinfo.xhtml",
590 "dom/serviceworkers/test/test_serviceworkermanager.xhtml",
591 "dom/system/tests/test_constants.xhtml",
592 "dom/tests/mochitest/chrome/DOMWindowCreated_chrome.xhtml",
593 "dom/tests/mochitest/chrome/MozDomFullscreen_chrome.xhtml",
594 "dom/tests/mochitest/chrome/sizemode_attribute.xhtml",
595 "dom/tests/mochitest/chrome/test_cyclecollector.xhtml",
596 "dom/tests/mochitest/chrome/test_docshell_swap.xhtml",
597 "dom/tests/mochitest/chrome/window_focus.xhtml",
598 "dom/url/tests/test_bug883784.xhtml",
599 "dom/workers/test/test_WorkerDebugger.xhtml",
600 "dom/workers/test/test_WorkerDebugger_console.xhtml",
601 "dom/workers/test/test_fileReadSlice.xhtml",
602 "dom/workers/test/test_fileReaderSync.xhtml",
603 "dom/workers/test/test_fileSlice.xhtml",
606 "mozilla/no-useless-parameters": "off",
607 "mozilla/no-useless-removeEventListener": "off",
608 "mozilla/use-chromeutils-generateqi": "off",
609 "mozilla/use-services": "off",
611 "no-array-constructor": "off",
615 "no-lone-blocks": "off",
617 "no-redeclare": "off",
619 "no-throw-literal": "off",
621 "no-unsanitized/method": "off",
622 "no-unused-vars": "off",
623 "no-useless-return": "off",
624 "object-shorthand": "off",
629 "toolkit/components/aboutmemory/tests/test_aboutmemory.xhtml",
630 "toolkit/components/aboutmemory/tests/test_aboutmemory2.xhtml",
631 "toolkit/components/aboutmemory/tests/test_aboutmemory3.xhtml",
632 "toolkit/components/aboutmemory/tests/test_aboutmemory4.xhtml",
633 "toolkit/components/aboutmemory/tests/test_aboutmemory5.xhtml",
634 "toolkit/components/aboutmemory/tests/test_aboutmemory7.xhtml",
635 "toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xhtml",
636 "toolkit/components/aboutmemory/tests/test_memoryReporters.xhtml",
637 "toolkit/components/aboutmemory/tests/test_memoryReporters2.xhtml",
638 "toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xhtml",
639 "toolkit/components/ctypes/tests/chrome/test_ctypes.xhtml",
640 "toolkit/components/osfile/tests/mochi/test_osfile_back.xhtml",
641 "toolkit/components/osfile/tests/mochi/test_osfile_comms.xhtml",
642 "toolkit/components/osfile/tests/mochi/test_osfile_front.xhtml",
643 "toolkit/components/places/tests/chrome/browser_disableglobalhistory.xhtml",
644 "toolkit/components/places/tests/chrome/test_browser_disableglobalhistory.xhtml",
645 "toolkit/components/places/tests/chrome/test_favicon_annotations.xhtml",
646 "toolkit/components/workerloader/tests/test_loading.xhtml",
647 "toolkit/content/tests/chrome/bug263683_window.xhtml",
648 "toolkit/content/tests/chrome/bug304188_window.xhtml",
649 "toolkit/content/tests/chrome/bug331215_window.xhtml",
650 "toolkit/content/tests/chrome/bug360437_window.xhtml",
651 "toolkit/content/tests/chrome/bug366992_window.xhtml",
652 "toolkit/content/tests/chrome/bug409624_window.xhtml",
653 "toolkit/content/tests/chrome/bug429723_window.xhtml",
654 "toolkit/content/tests/chrome/bug451540_window.xhtml",
655 "toolkit/content/tests/chrome/dialog_dialogfocus.xhtml",
656 "toolkit/content/tests/chrome/findbar_entireword_window.xhtml",
657 "toolkit/content/tests/chrome/findbar_events_window.xhtml",
658 "toolkit/content/tests/chrome/findbar_window.xhtml",
659 "toolkit/content/tests/chrome/frame_popup_anchor.xhtml",
660 "toolkit/content/tests/chrome/frame_subframe_origin_subframe1.xhtml",
661 "toolkit/content/tests/chrome/frame_subframe_origin_subframe2.xhtml",
662 "toolkit/content/tests/chrome/test_arrowpanel.xhtml",
663 "toolkit/content/tests/chrome/test_autocomplete2.xhtml",
664 "toolkit/content/tests/chrome/test_autocomplete3.xhtml",
665 "toolkit/content/tests/chrome/test_autocomplete4.xhtml",
666 "toolkit/content/tests/chrome/test_autocomplete5.xhtml",
667 "toolkit/content/tests/chrome/test_autocomplete_emphasis.xhtml",
668 "toolkit/content/tests/chrome/test_autocomplete_mac_caret.xhtml",
669 "toolkit/content/tests/chrome/test_autocomplete_placehold_last_complete.xhtml",
670 "toolkit/content/tests/chrome/test_browser_drop.xhtml",
671 "toolkit/content/tests/chrome/test_bug1048178.xhtml",
672 "toolkit/content/tests/chrome/test_bug382990.xhtml",
673 "toolkit/content/tests/chrome/test_bug437844.xhtml",
674 "toolkit/content/tests/chrome/test_bug624329.xhtml",
675 "toolkit/content/tests/chrome/test_bug792324.xhtml",
676 "toolkit/content/tests/chrome/test_contextmenu_list.xhtml",
677 "toolkit/content/tests/chrome/test_cursorsnap.xhtml",
678 "toolkit/content/tests/chrome/test_dialogfocus.xhtml",
679 "toolkit/content/tests/chrome/test_hiddenitems.xhtml",
680 "toolkit/content/tests/chrome/test_hiddenpaging.xhtml",
681 "toolkit/content/tests/chrome/test_maximized_persist.xhtml",
682 "toolkit/content/tests/chrome/test_menu.xhtml",
683 "toolkit/content/tests/chrome/test_menuitem_blink.xhtml",
684 "toolkit/content/tests/chrome/test_menulist.xhtml",
685 "toolkit/content/tests/chrome/test_menulist_keynav.xhtml",
686 "toolkit/content/tests/chrome/test_mousescroll.xhtml",
687 "toolkit/content/tests/chrome/test_mozinputbox_dictionary.xhtml",
688 "toolkit/content/tests/chrome/test_notificationbox.xhtml",
689 "toolkit/content/tests/chrome/test_panel_focus.xhtml",
690 "toolkit/content/tests/chrome/test_popup_keys.xhtml",
691 "toolkit/content/tests/chrome/test_popup_scaled.xhtml",
692 "toolkit/content/tests/chrome/test_popupincontent.xhtml",
693 "toolkit/content/tests/chrome/test_popupremoving.xhtml",
694 "toolkit/content/tests/chrome/test_popupremoving_frame.xhtml",
695 "toolkit/content/tests/chrome/test_position.xhtml",
696 "toolkit/content/tests/chrome/test_preferences.xhtml",
697 "toolkit/content/tests/chrome/test_richlistbox.xhtml",
698 "toolkit/content/tests/chrome/test_righttoleft.xhtml",
699 "toolkit/content/tests/chrome/test_screenPersistence.xhtml",
700 "toolkit/content/tests/chrome/test_scrollbar.xhtml",
701 "toolkit/content/tests/chrome/test_showcaret.xhtml",
702 "toolkit/content/tests/chrome/test_tabbox.xhtml",
703 "toolkit/content/tests/chrome/test_textbox_search.xhtml",
704 "toolkit/content/tests/chrome/test_tree_view.xhtml",
705 "toolkit/content/tests/chrome/window_browser_drop.xhtml",
706 "toolkit/content/tests/chrome/window_cursorsnap_dialog.xhtml",
707 "toolkit/content/tests/chrome/window_cursorsnap_wizard.xhtml",
708 "toolkit/content/tests/chrome/window_keys.xhtml",
709 "toolkit/content/tests/chrome/window_largemenu.xhtml",
710 "toolkit/content/tests/chrome/window_panel.xhtml",
711 "toolkit/content/tests/chrome/window_panel_anchoradjust.xhtml",
712 "toolkit/content/tests/chrome/window_popup_preventdefault_chrome.xhtml",
713 "toolkit/content/tests/chrome/window_preferences.xhtml",
714 "toolkit/content/tests/chrome/window_preferences3.xhtml",
715 "toolkit/content/tests/chrome/window_preferences_beforeaccept.xhtml",
716 "toolkit/content/tests/chrome/window_preferences_commandretarget.xhtml",
717 "toolkit/content/tests/chrome/window_preferences_disabled.xhtml",
718 "toolkit/content/tests/chrome/window_preferences_onsyncfrompreference.xhtml",
719 "toolkit/content/tests/chrome/window_subframe_origin.xhtml",
720 "toolkit/content/tests/chrome/window_titlebar.xhtml",
721 "toolkit/content/tests/chrome/window_tooltip.xhtml",
722 "toolkit/content/tests/widgets/test_contextmenu_menugroup.xhtml",
723 "toolkit/content/tests/widgets/test_contextmenu_nested.xhtml",
724 "toolkit/content/tests/widgets/test_editor_currentURI.xhtml",
725 "toolkit/content/tests/widgets/test_popupanchor.xhtml",
726 "toolkit/content/tests/widgets/test_popupreflows.xhtml",
727 "toolkit/content/tests/widgets/window_menubar.xhtml",
728 "toolkit/modules/tests/chrome/test_bug544442_checkCert.xhtml",
729 "toolkit/profile/test/test_create_profile.xhtml",
732 "object-shorthand": "off",
733 "consistent-return": "off",
734 "mozilla/consistent-if-bracing": "off",
735 "mozilla/no-compare-against-boolean-literals": "off",
736 "mozilla/no-useless-parameters": "off",
737 "mozilla/no-useless-removeEventListener": "off",
738 "mozilla/prefer-boolean-length-check": "off",
739 "mozilla/use-cc-etc": "off",
740 "mozilla/use-chromeutils-generateqi": "off",
741 "mozilla/use-chromeutils-import": "off",
742 "mozilla/use-default-preference-values": "off",
743 "mozilla/use-services": "off",
745 "no-else-return": "off",
747 "no-fallthrough": "off",
748 "no-irregular-whitespace": "off",
749 "no-lonely-if": "off",
750 "no-nested-ternary": "off",
751 "no-redeclare": "off",
752 "no-sequences": "off",
754 "no-throw-literal": "off",
756 "no-unneeded-ternary": "off",
757 "no-unused-vars": "off",
758 "no-useless-concat": "off",
759 "no-useless-return": "off",
768 "editor/libeditor/tests/**",
769 "editor/spellchecker/tests/test_bug338427.html",
771 "image/test/browser/browser_image.js",
778 "security/manager/**",
780 "storage/test/unit/test_vacuum.js",
781 "taskcluster/docker/periodic-updates/scripts/**",
784 "widget/tests/test_assign_event_data.html",
787 "mozilla/prefer-boolean-length-check": "off",
791 // TODO: Bug 1609271 Fix all violations for ChromeUtils.import(..., null)
793 "browser/base/content/test/forms/head.js",
794 "browser/base/content/test/general/browser_datachoices_notification.js",
795 "browser/base/content/test/plugins/head.js",
796 "browser/base/content/test/sync/browser_fxa_web_channel.js",
797 "browser/base/content/test/webextensions/head.js",
798 "browser/components/customizableui/test/browser_1042100_default_placements_update.js",
799 "browser/components/customizableui/test/browser_1096763_seen_widgets_post_reset.js",
800 "browser/components/customizableui/test/browser_1161838_inserted_new_default_buttons.js",
801 "browser/components/customizableui/test/browser_989338_saved_placements_not_resaved.js",
802 "browser/components/customizableui/test/browser_currentset_post_reset.js",
803 "browser/components/customizableui/test/browser_panel_keyboard_navigation.js",
804 "browser/components/enterprisepolicies/tests/browser/browser_policies_setAndLockPref_API.js",
805 "browser/components/enterprisepolicies/tests/browser/head.js",
806 "browser/components/enterprisepolicies/tests/xpcshell/head.js",
807 "browser/components/enterprisepolicies/tests/xpcshell/test_proxy.js",
808 "browser/components/enterprisepolicies/tests/xpcshell/test_runOnce_helper.js",
809 "browser/components/extensions/test/browser/browser_ext_browserAction_context.js",
810 "browser/components/extensions/test/browser/browser_ext_browserAction_popup.js",
811 "browser/components/extensions/test/browser/browser_ext_browserAction_popup_preload.js",
812 "browser/components/extensions/test/browser/browser_ext_currentWindow.js",
813 "browser/components/extensions/test/browser/browser_ext_getViews.js",
814 "browser/components/extensions/test/browser/browser_ext_management.js",
815 "browser/components/extensions/test/browser/browser_ext_menus_events.js",
816 "browser/components/extensions/test/browser/browser_ext_openPanel.js",
817 "browser/components/extensions/test/browser/browser_ext_pageAction_context.js",
818 "browser/components/extensions/test/browser/browser_ext_pageAction_popup.js",
819 "browser/components/extensions/test/browser/browser_ext_pageAction_show_matches.js",
820 "browser/components/extensions/test/browser/browser_ext_sessions_getRecentlyClosed_private.js",
821 "browser/components/extensions/test/browser/browser_ext_sessions_restore.js",
822 "browser/components/extensions/test/browser/browser_ext_tabs_audio.js",
823 "browser/components/extensions/test/browser/browser_ext_tabs_create_url.js",
824 "browser/components/extensions/test/browser/browser_ext_tabs_duplicate.js",
825 "browser/components/extensions/test/browser/browser_ext_tabs_newtab_private.js",
826 "browser/components/extensions/test/browser/browser_ext_tabs_removeCSS.js",
827 "browser/components/extensions/test/browser/browser_ext_tabs_zoom.js",
828 "browser/components/extensions/test/browser/browser_ext_windows.js",
829 "browser/components/extensions/test/browser/browser_ext_windows_events.js",
830 "browser/components/extensions/test/browser/head.js",
831 "browser/components/extensions/test/browser/head_webNavigation.js",
832 "browser/components/extensions/test/xpcshell/test_ext_url_overrides_newtab.js",
833 "browser/components/migration/tests/unit/test_Edge_db_migration.js",
834 "browser/components/preferences/tests/browser_contentblocking.js",
835 "browser/components/translation/test/unit/test_cld2.js",
836 "browser/components/urlbar/tests/ext/browser/update/browser_getBrowserUpdateStatus_updateDisabledByPolicy.js",
837 "browser/extensions/formautofill/test/unit/head.js",
838 "browser/extensions/formautofill/test/unit/test_creditCardRecords.js",
839 "browser/extensions/formautofill/test/unit/test_migrateRecords.js",
840 "browser/extensions/formautofill/test/unit/test_storage_remove.js",
841 "browser/extensions/formautofill/test/unit/test_storage_tombstones.js",
842 "browser/extensions/formautofill/test/unit/test_sync.js",
843 "browser/extensions/formautofill/test/unit/test_transformFields.js",
844 "browser/extensions/report-site-issue/experimentalAPIs/pageActionExtras.js",
845 "browser/extensions/report-site-issue/test/browser/head.js",
846 "browser/modules/test/unit/test_LiveBookmarkMigrator.js",
847 "devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_addons_debug_popup.js",
848 "dom/ipc/tests/browser_memory_distribution_telemetry.js",
849 "dom/push/test/xpcshell/head.js",
850 "dom/push/test/xpcshell/test_broadcast_success.js",
851 "dom/push/test/xpcshell/test_crypto.js",
852 "gfx/layers/apz/test/mochitest/browser_test_select_zoom.js",
853 "security/manager/ssl/RemoteSecuritySettings.jsm",
854 "security/manager/ssl/tests/unit/test_der.js",
855 "security/manager/ssl/X509.jsm",
856 "services/common/tests/unit/head_helpers.js",
857 "services/common/tests/unit/test_uptake_telemetry.js",
858 "services/fxaccounts/tests/xpcshell/test_accounts.js",
859 "services/fxaccounts/tests/xpcshell/test_accounts_device_registration.js",
860 "services/fxaccounts/tests/xpcshell/test_loginmgr_storage.js",
861 "services/fxaccounts/tests/xpcshell/test_oauth_token_storage.js",
862 "services/fxaccounts/tests/xpcshell/test_oauth_tokens.js",
863 "services/fxaccounts/tests/xpcshell/test_web_channel.js",
864 "services/sync/modules-testing/utils.js",
865 "services/sync/tests/unit/test_doctor.js",
866 "services/sync/tests/unit/test_postqueue.js",
867 "testing/marionette/components/marionette.js",
868 "testing/marionette/driver.js",
869 "testing/marionette/format.js",
870 "testing/marionette/server.js",
871 "testing/marionette/test/unit/test_prefs.js",
872 "testing/mochitest/browser-test.js",
873 "testing/mochitest/BrowserTestUtils/content/content-task.js",
874 "testing/xpcshell/head.js",
875 "toolkit/components/cloudstorage/tests/unit/test_cloudstorage.js",
876 "toolkit/components/crashes/tests/xpcshell/test_crash_manager.js",
877 "toolkit/components/crashes/tests/xpcshell/test_crash_service.js",
878 "toolkit/components/crashes/tests/xpcshell/test_crash_store.js",
879 "toolkit/components/enterprisepolicies/tests/browser/head.js",
880 "toolkit/components/enterprisepolicies/tests/EnterprisePolicyTesting.jsm",
881 "toolkit/components/enterprisepolicies/tests/xpcshell/head.js",
882 "toolkit/components/extensions/ExtensionPreferencesManager.jsm",
883 "toolkit/components/extensions/ExtensionXPCShellUtils.jsm",
884 "toolkit/components/extensions/ExtensionXPCShellUtils.jsm",
885 "toolkit/components/extensions/parent/ext-management.js",
886 "toolkit/components/extensions/test/mochitest/test_ext_contentscript_cache.html",
887 "toolkit/components/extensions/test/xpcshell/head_native_messaging.js",
888 "toolkit/components/extensions/test/xpcshell/test_ext_api_permissions.js",
889 "toolkit/components/extensions/test/xpcshell/test_ext_background_early_shutdown.js",
890 "toolkit/components/extensions/test/xpcshell/test_ext_background_teardown.js",
891 "toolkit/components/extensions/test/xpcshell/test_ext_contentscript_context.js",
892 "toolkit/components/extensions/test/xpcshell/test_ext_contentscript_context_isolation.js",
893 "toolkit/components/extensions/test/xpcshell/test_ext_contentscript_teardown.js",
894 "toolkit/components/extensions/test/xpcshell/test_ext_contexts_gc.js",
895 "toolkit/components/extensions/test/xpcshell/test_ext_privacy_disable.js",
896 "toolkit/components/extensions/test/xpcshell/test_ext_schemas_interactive.js",
897 "toolkit/components/extensions/test/xpcshell/test_ext_shutdown_cleanup.js",
898 "toolkit/components/extensions/test/xpcshell/test_ext_storage_sync_kinto.js",
899 "toolkit/components/extensions/test/xpcshell/test_ext_storage_sync_kinto_crypto.js",
900 "toolkit/components/extensions/test/xpcshell/test_ext_tab_teardown.js",
901 "toolkit/components/extensions/test/xpcshell/test_native_manifests.js",
902 "toolkit/components/featuregates/test/unit/test_FeatureGate.js",
903 "toolkit/components/mozintl/mozIntl.jsm",
904 "toolkit/components/normandy/test/browser/browser_actions_ShowHeartbeatAction.js",
905 "toolkit/components/osfile/modules/osfile_async_front.jsm",
906 "toolkit/components/osfile/modules/osfile_native.jsm",
907 "toolkit/components/osfile/tests/xpcshell/test_osfile_kill.js",
908 "toolkit/components/passwordmgr/test/unit/test_getFormFields.js",
909 "toolkit/components/passwordmgr/test/unit/test_getPasswordFields.js",
910 "toolkit/components/passwordmgr/test/unit/test_getUserNameAndPasswordFields.js",
911 "toolkit/components/processsingleton/MainProcessSingleton.jsm",
912 "toolkit/components/telemetry/tests/unit/head.js",
913 "toolkit/components/telemetry/tests/unit/test_EcosystemTelemetry.js",
914 "toolkit/components/telemetry/tests/unit/test_EventPing.js",
915 "toolkit/components/telemetry/tests/unit/test_HealthPing.js",
916 "toolkit/components/telemetry/tests/unit/test_PingAPI.js",
917 "toolkit/components/telemetry/tests/unit/test_PrioPing.js",
918 "toolkit/components/telemetry/tests/unit/test_TelemetryController_idle.js",
919 "toolkit/components/telemetry/tests/unit/test_TelemetryReportingPolicy.js",
920 "toolkit/components/telemetry/tests/unit/test_TelemetrySendOldPings.js",
921 "toolkit/components/telemetry/tests/unit/test_TelemetrySession.js",
922 "toolkit/modules/subprocess/test/xpcshell/test_subprocess.js",
923 "toolkit/modules/tests/xpcshell/test_GMPInstallManager.js",
924 "toolkit/mozapps/extensions/internal/AddonTestUtils.jsm",
925 "toolkit/mozapps/extensions/test/browser/browser_gmpProvider.js",
926 "toolkit/mozapps/extensions/test/xpcshell/head_addons.js",
927 "toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_clients.js",
928 "toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_regexp_split.js",
929 "toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_targetapp_filter.js",
930 "toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_telemetry.js",
931 "toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklistchange.js",
932 "toolkit/mozapps/extensions/test/xpcshell/test_gmpProvider.js",
933 "toolkit/mozapps/extensions/test/xpcshell/test_no_addons.js",
934 "toolkit/mozapps/extensions/test/xpcshell/test_permissions_prefs.js",
935 "toolkit/mozapps/extensions/test/xpcshell/test_signed_updatepref.js",
936 "toolkit/mozapps/extensions/test/xpcshell/test_signed_verify.js",
937 "toolkit/mozapps/extensions/test/xpcshell/test_webextension.js",
938 "toolkit/mozapps/extensions/test/xpcshell/test_webextension_events.js",
939 "toolkit/mozapps/extensions/test/xpcshell/test_XPIStates.js",
940 "toolkit/mozapps/installer/precompile_cache.js",
943 "mozilla/reject-chromeutils-import-null": "off",
948 "browser/base/content/browser-gestureSupport.js",
949 "browser/base/content/tabbrowser-tab.js",
950 "browser/base/content/tabbrowser-tabs.js",
951 "browser/base/content/tabbrowser.js",
952 "browser/components/downloads/DownloadsCommon.jsm",
953 "browser/components/downloads/content/allDownloadsView.js",
954 "browser/components/downloads/content/downloads.js",
955 "browser/components/downloads/content/indicator.js",
956 "browser/components/payments/res/components/csc-input.js",
957 "browser/components/payments/res/components/labelled-checkbox.js",
958 "browser/components/pocket/content/Pocket.jsm",
959 "browser/components/preferences/search.js",
960 "browser/components/search/content/search-one-offs.js",
961 "browser/components/search/content/searchbar.js",
962 "browser/components/sessionstore/ContentSessionStore.jsm",
963 "browser/components/urlbar/UrlbarInput.jsm",
964 "browser/components/urlbar/UrlbarView.jsm",
965 "browser/extensions/formautofill/content/customElements.js",
966 "browser/modules/PageActions.jsm",
967 "devtools/client/shared/async-store-helper.js",
968 "devtools/client/shared/prefs.js",
969 "devtools/shared/task.js",
970 "dom/base/SlowScriptDebug.jsm",
971 "dom/media/PeerConnection.jsm",
972 "mobile/android/chrome/geckoview/SessionStateAggregator.js",
973 "mobile/android/modules/geckoview/DelayedInit.jsm",
974 "services/sync/modules/record.js",
975 "toolkit/actors/AutoCompleteChild.jsm",
976 "toolkit/components/autocomplete/tests/unit/test_stopSearch.js",
977 "toolkit/components/enterprisepolicies/EnterprisePoliciesParent.jsm",
978 "toolkit/components/extensions/ExtensionParent.jsm",
979 "toolkit/components/osfile/modules/osfile_async_front.jsm",
980 "toolkit/components/osfile/modules/osfile_shared_allthreads.jsm",
981 "toolkit/content/aboutSupport.js",
982 "toolkit/content/customElements.js",
983 "toolkit/content/preferencesBindings.js",
984 "toolkit/content/tests/chrome/test_custom_element_base.xhtml",
985 "toolkit/content/viewZoomOverlay.js",
986 "toolkit/content/widgets/*.js",
987 "toolkit/modules/NewTabUtils.jsm",
988 "toolkit/modules/tests/modules/Task.jsm",
989 "toolkit/mozapps/extensions/AddonManager.jsm",
990 "toolkit/mozapps/extensions/internal/PluginProvider.jsm",
991 "toolkit/mozapps/extensions/internal/XPIDatabase.jsm",
992 "toolkit/mozapps/extensions/test/browser/head.js",
993 "toolkit/mozapps/extensions/test/xpcshell/head_addons.js",
994 "toolkit/mozapps/handling/content/dialog.js",
997 "no-setter-return": "off",