summaryrefslogtreecommitdiffstats
path: root/.eslintrc.js
diff options
context:
space:
mode:
Diffstat (limited to '.eslintrc.js')
-rw-r--r--.eslintrc.js208
1 files changed, 188 insertions, 20 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
index d51508e5f7..ba042316c1 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -15,6 +15,11 @@ const path = require("path");
/**
* Some configurations have overrides, which can't be specified within overrides,
* so we need to remove them.
+ *
+ * @param {object} config
+ * The configuration to remove overrides from.
+ * @returns {object}
+ * The new configuration.
*/
function removeOverrides(config) {
config = { ...config };
@@ -166,7 +171,7 @@ module.exports = {
"no-unused-vars": [
"error",
{
- args: "none",
+ argsIgnorePattern: "^_",
vars: "local",
},
],
@@ -184,7 +189,7 @@ module.exports = {
"no-unused-vars": [
"error",
{
- args: "none",
+ argsIgnorePattern: "^_",
vars: "all",
},
],
@@ -574,7 +579,6 @@ module.exports = {
"toolkit/components/cleardata/**",
"toolkit/components/contentprefs/ContentPrefService2.sys.mjs",
"toolkit/components/cookiebanners/**",
- "toolkit/components/corroborator/Corroborate.sys.mjs",
"toolkit/components/crashes/**",
"toolkit/components/crashmonitor/CrashMonitor.sys.mjs",
"toolkit/components/credentialmanagement/IdentityCredentialPromptService.sys.mjs",
@@ -625,6 +629,173 @@ module.exports = {
extends: ["plugin:mozilla/valid-jsdoc"],
},
{
+ files: ["**"],
+ excludedFiles: [
+ "accessible/tests/**",
+ "browser/actors/**",
+ "browser/base/content/**",
+ "browser/components/Browser*",
+ "browser/components/aboutlogins/**",
+ "browser/components/aboutwelcome/**",
+ "browser/components/asrouter/**",
+ "browser/components/attribution/**",
+ "browser/components/contentanalysis/content/ContentAnalysis.sys.mjs",
+ "browser/components/customizableui/**",
+ "browser/components/doh/TRRPerformance.sys.mjs",
+ "browser/components/downloads/**",
+ "browser/components/enterprisepolicies/Policies.sys.mjs",
+ "browser/components/extensions/**",
+ "browser/components/firefoxview/**",
+ "browser/components/messagepreview/actors/**",
+ "browser/components/newtab/**",
+ "browser/components/originattributes/test/browser/**",
+ "browser/components/pocket/content/**",
+ "browser/components/preferences/**",
+ "browser/components/privatebrowsing/**",
+ "browser/components/profiles/Profiles**",
+ "browser/components/protections/content/*card.mjs",
+ "browser/components/protocolhandler/WebProtocolHandlerRegistrar.sys.mjs",
+ "browser/components/reportbrokensite/ReportBrokenSite.sys.mjs",
+ "browser/components/reportbrokensite/test/browser/head.js",
+ "browser/components/resistfingerprinting/test/browser/head.js",
+ "browser/components/safebrowsing/content/test/**",
+ "browser/components/screenshots/**",
+ "browser/components/sidebar/**",
+ "browser/components/shell/**",
+ "browser/components/sessionstore/**",
+ "browser/components/shopping/**",
+ "browser/components/storybook/.storybook/**",
+ "browser/components/storybook/custom-elements-manifest.config.mjs",
+ "browser/components/syncedtabs/**",
+ "browser/components/tabpreview/tabpreview.mjs",
+ "browser/components/tests/browser/**",
+ "browser/components/textrecognition/**",
+ "browser/components/touchbar/**",
+ "browser/components/translations/**",
+ "browser/components/uitour/**",
+ "browser/extensions/formautofill/**",
+ "browser/extensions/pictureinpicture/**",
+ "browser/extensions/report-site-issue/test/browser/head.js",
+ "browser/extensions/search-detection/extension/background.js",
+ "browser/extensions/screenshots/**",
+ "browser/extensions/webcompat/**",
+ "browser/fxr/content/permissions.js",
+ "browser/modules/**",
+ "browser/themes/BuiltInThemes.sys.mjs",
+ "browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.sys.mjs",
+ "caps/tests/mochitest/**",
+ "devtools/**",
+ "docshell/base/URIFixup.sys.mjs",
+ "docshell/test/**",
+ "dom/**",
+ "editor/**",
+ "extensions/permissions/test/PermissionTestUtils.sys.mjs",
+ "gfx/layers/apz/test/mochitest/**",
+ "image/test/**",
+ "intl/**",
+ "ipc/glue/test/browser/head-telemetry.js",
+ "js/src/builtin/**",
+ "js/xpconnect/**",
+ "layout/**",
+ "mobile/android/**",
+ "modules/**",
+ "netwerk/**",
+ "parser/htmlparser/**",
+ "remote/cdp/**",
+ "remote/components/**",
+ "remote/marionette/**",
+ "remote/server/WebSocketHandshake.sys.mjs",
+ "remote/shared/**",
+ "remote/webdriver-bidi/**",
+ "security/manager/**",
+ "services/**",
+ "storage/**",
+ "testing/**",
+ "toolkit/actors/**",
+ "toolkit/components/aboutconfig/**",
+ "toolkit/components/aboutmemory/**",
+ "toolkit/components/aboutprocesses/content/aboutProcesses.js",
+ "toolkit/components/antitracking/**",
+ "toolkit/components/apppicker/content/appPicker.js",
+ "toolkit/components/asyncshutdown/**",
+ "toolkit/components/autocomplete/**",
+ "toolkit/components/backgroundtasks/**",
+ "toolkit/components/bitsdownload/Bits.sys.mjs",
+ "toolkit/components/certviewer/**",
+ "toolkit/components/cleardata/**",
+ "toolkit/components/contentprefs/ContentPrefService*.sys.mjs",
+ "toolkit/components/contentrelevancy/ContentRelevancyManager.sys.mjs",
+ "toolkit/components/cookiebanners/**",
+ "toolkit/components/crashes/**",
+ "toolkit/components/crashmonitor/CrashMonitor.sys.mjs",
+ "toolkit/components/credentialmanagement/IdentityCredentialPromptService.sys.mjs",
+ "toolkit/components/ctypes/tests/**",
+ "toolkit/components/downloads/**",
+ "toolkit/components/enterprisepolicies/EnterprisePolicies*.sys.mjs",
+ "toolkit/components/extensions/**",
+ "toolkit/components/featuregates/**",
+ "toolkit/components/forgetaboutsite/**",
+ "toolkit/components/formautofill/**",
+ "toolkit/components/glean/tests/browser/**",
+ "toolkit/components/httpsonlyerror/tests/browser/head.js",
+ "toolkit/components/kvstore/kvstore.sys.mjs",
+ "toolkit/components/lz4/lz4.js",
+ "toolkit/components/messaging-system/**",
+ "toolkit/components/ml/**",
+ "toolkit/components/mozintl/mozIntl.sys.mjs",
+ "toolkit/components/narrate/**",
+ "toolkit/components/nimbus/**",
+ "toolkit/components/normandy/**",
+ "toolkit/components/passwordmgr/**",
+ "toolkit/components/pdfjs/**",
+ "toolkit/components/pictureinpicture/**",
+ "toolkit/components/places/**",
+ "toolkit/components/printing/content/print*.*",
+ "toolkit/components/printing/tests/head.js",
+ "toolkit/components/processtools/tests/browser/browser_test_powerMetrics.js",
+ "toolkit/components/promiseworker/**/PromiseWorker.*",
+ "toolkit/components/prompts/**",
+ "toolkit/components/reader/**",
+ "toolkit/components/remotebrowserutils/RemoteWebNavigation.sys.mjs",
+ "toolkit/components/reportbrokensite/ReportBrokenSite*.sys.mjs",
+ "toolkit/components/reputationservice/test/unit/test_app_rep_windows.js",
+ "toolkit/components/resistfingerprinting/**",
+ "toolkit/components/satchel/**",
+ "toolkit/components/shopping/content/ShoppingProduct.mjs",
+ "toolkit/components/taskscheduler/TaskScheduler*.*",
+ "toolkit/components/telemetry/**",
+ "toolkit/components/thumbnails/**",
+ "toolkit/components/timermanager/UpdateTimerManager.*",
+ "toolkit/components/translation/LanguageDetector.*",
+ "toolkit/components/translations/**",
+ "toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/test_callbacks.js",
+ "toolkit/components/uniffi-js/js/UniFFI.sys.mjs",
+ "toolkit/components/url-classifier/**",
+ "toolkit/components/utils/**",
+ "toolkit/components/viewsource/**",
+ "toolkit/components/windowwatcher/**",
+ "toolkit/components/workerloader/require.js",
+ "toolkit/content/**",
+ "toolkit/crashreporter/**",
+ "toolkit/modules/**",
+ "toolkit/mozapps/downloads/**",
+ "toolkit/mozapps/extensions/**",
+ "toolkit/mozapps/handling/**",
+ "toolkit/mozapps/update/**",
+ "toolkit/profile/content/profileSelection.js",
+ "toolkit/profile/xpcshell/head.js",
+ "toolkit/profile/test/test_create_profile.xhtml",
+ "toolkit/themes/shared/design-system/tokens-config.js",
+ "tools/code-coverage/tests/mochitest/test_coverage_specialpowers.html",
+ "tools/lint/eslint/**",
+ "tools/profiler/tests/**",
+ "uriloader/**",
+ "widget/tests/file*.js",
+ "widget/tests/window_composition_text_querycontent.xhtml",
+ ],
+ extends: ["plugin:mozilla/require-jsdoc"],
+ },
+ {
files: ["layout/**"],
excludedFiles: ["layout/tools/reftest/**"],
rules: {
@@ -2079,18 +2250,18 @@ module.exports = {
"toolkit/components/processtools/tests/browser/browser_test_procinfo.js",
"toolkit/components/prompts/test/test_modal_prompts.html",
"toolkit/components/prompts/test/test_subresources_prompts.html",
- "toolkit/components/reader/test/browser_bug1453818_samesite_cookie.js",
- "toolkit/components/reader/test/browser_drag_url_readerMode.js",
- "toolkit/components/reader/test/browser_readerMode_bc_reuse.js",
- "toolkit/components/reader/test/browser_readerMode_colorSchemePref.js",
- "toolkit/components/reader/test/browser_readerMode_hidden_nodes.js",
- "toolkit/components/reader/test/browser_readerMode_menu.js",
- "toolkit/components/reader/test/browser_readerMode_pocket.js",
- "toolkit/components/reader/test/browser_readerMode_readingTime.js",
- "toolkit/components/reader/test/browser_readerMode_refresh.js",
- "toolkit/components/reader/test/browser_readerMode_remoteType.js",
- "toolkit/components/reader/test/browser_readerMode_samesite_cookie_redirect.js",
- "toolkit/components/reader/test/browser_readerMode_with_anchor.js",
+ "toolkit/components/reader/tests/browser/browser_bug1453818_samesite_cookie.js",
+ "toolkit/components/reader/tests/browser/browser_drag_url_readerMode.js",
+ "toolkit/components/reader/tests/browser/browser_readerMode_bc_reuse.js",
+ "toolkit/components/reader/tests/browser/browser_readerMode_colorSchemePref.js",
+ "toolkit/components/reader/tests/browser/browser_readerMode_hidden_nodes.js",
+ "toolkit/components/reader/tests/browser/browser_readerMode_menu.js",
+ "toolkit/components/reader/tests/browser/browser_readerMode_pocket.js",
+ "toolkit/components/reader/tests/browser/browser_readerMode_readingTime.js",
+ "toolkit/components/reader/tests/browser/browser_readerMode_refresh.js",
+ "toolkit/components/reader/tests/browser/browser_readerMode_remoteType.js",
+ "toolkit/components/reader/tests/browser/browser_readerMode_samesite_cookie_redirect.js",
+ "toolkit/components/reader/tests/browser/browser_readerMode_with_anchor.js",
"toolkit/components/resistfingerprinting/tests/test_spoof_english.html",
"toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js",
"toolkit/components/startup/tests/browser/browser_bug511456.js",
@@ -2207,10 +2378,7 @@ module.exports = {
},
},
{
- files: ["**"],
- excludedFiles: [
- // Devtools code, see bug 1525652.
- "devtools/**",
+ files: [
// Tests specific to JSM
"dom/encoding/test/test_stringencoding.xhtml",
"dom/url/tests/test_bug883784.xhtml",
@@ -2225,7 +2393,7 @@ module.exports = {
"js/xpconnect/loader/XPCOMUtils.sys.mjs",
],
rules: {
- "mozilla/reject-chromeutils-import": "error",
+ "mozilla/reject-chromeutils-import": "off",
},
},
{