mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1799465 - Enable require-jsdoc rules by default, disabling on code where there are existing failures. r=frontend-codestyle-reviewers,migration-reviewers,backup-reviewers,mossop,mconley
Differential Revision: https://phabricator.services.mozilla.com/D206878
This commit is contained in:
parent
7883d0266b
commit
cbbf28809f
172
.eslintrc.js
172
.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 };
|
||||
@ -623,6 +628,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/**"],
|
||||
|
@ -1,9 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
extends: ["plugin:mozilla/require-jsdoc"],
|
||||
};
|
@ -5,7 +5,6 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
extends: ["plugin:mozilla/require-jsdoc"],
|
||||
rules: {
|
||||
"block-scoped-var": "error",
|
||||
complexity: ["error", { max: 22 }],
|
||||
|
@ -5,8 +5,6 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
extends: ["plugin:mozilla/require-jsdoc"],
|
||||
|
||||
rules: {
|
||||
"mozilla/var-only-at-top-level": "error",
|
||||
"no-unused-expressions": "error",
|
||||
|
@ -1,9 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
extends: ["plugin:mozilla/require-jsdoc"],
|
||||
};
|
@ -5,8 +5,6 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
extends: ["plugin:mozilla/require-jsdoc"],
|
||||
|
||||
rules: {
|
||||
"mozilla/var-only-at-top-level": "error",
|
||||
},
|
||||
|
@ -5,8 +5,6 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
extends: ["plugin:mozilla/require-jsdoc"],
|
||||
|
||||
rules: {
|
||||
"mozilla/var-only-at-top-level": "error",
|
||||
"no-unused-expressions": "error",
|
||||
|
@ -1,9 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
extends: ["plugin:mozilla/require-jsdoc"],
|
||||
};
|
Loading…
Reference in New Issue
Block a user