Bug 1918630 - Enable no-shadow/no-redeclare rules for a first set of files. r=#thunderbird-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D222187

--HG--
extra : rebase_source : d7482c4950bf285a4d67f2021b59132145376e41
This commit is contained in:
Kai Engert 2024-09-14 00:08:12 +02:00
Родитель b2304277eb
Коммит 2f43b70b9d
1 изменённых файлов: 67 добавлений и 0 удалений

Просмотреть файл

@ -183,5 +183,72 @@ module.exports = {
excludedFiles: [".eslintrc.js"],
extends: ["plugin:mozilla/valid-jsdoc"],
},
{
// Files that have been fixed to work with rules
// no-redeclare and no-shadow
files: [
".eslintrc.js",
"mail/test/browser/composition/browser_redirect.js",
"mail/test/browser/composition/browser_replySelection.js",
"mail/test/browser/composition/browser_sendButton.js",
"mail/test/browser/content-policy/browser_dnsPrefetch.js",
"mail/test/browser/content-policy/browser_exposedInContentTabs.js",
"mail/test/browser/content-policy/browser_generalContentPolicy.js",
"mail/test/browser/folder-display/browser_displayName.js",
"mail/test/browser/folder-display/browser_messageCommands.js",
"mail/test/browser/folder-display/browser_summarization.js",
"mail/test/browser/import/browser_exportProfile.js",
"mail/test/browser/import/browser_importProfile.js",
"mail/test/browser/import/browser_importTabChange.js",
"mail/test/browser/session-store/browser_sessionStore.js",
"mail/test/browser/shared-modules/ComposeHelpers.sys.mjs",
"mail/test/browser/shared-modules/ContentTabHelpers.sys.mjs",
"mail/test/browser/shared-modules/FolderDisplayHelpers.sys.mjs",
"mail/test/browser/shared-modules/NNTPHelpers.sys.mjs",
"mail/test/browser/shared-modules/OpenPGPTestUtils.sys.mjs",
"mail/test/browser/shared-modules/SubscribeWindowHelpers.sys.mjs",
"mail/test/browser/shared-modules/WindowHelpers.sys.mjs",
"mailnews/addrbook/modules/AddrBookManager.sys.mjs",
"mailnews/addrbook/modules/CardDAVDirectory.sys.mjs",
"mailnews/addrbook/modules/CardDAVUtils.sys.mjs",
"mailnews/addrbook/modules/LDAPMessage.sys.mjs",
"mailnews/addrbook/src/AbAutoCompleteSearch.sys.mjs",
"mailnews/base/prefs/content/AccountManager.js",
"mailnews/base/prefs/content/removeAccount.js",
"mailnews/base/src/MailNotificationService.sys.mjs",
"mailnews/base/src/MsgIncomingServer.sys.mjs",
"mailnews/base/src/MsgProtocolInfo.sys.mjs",
"mailnews/base/src/OAuth2.sys.mjs",
"mailnews/base/src/mailstoreConverter.sys.mjs",
"mailnews/compose/src/MessageSend.sys.mjs",
"mailnews/db/gloda/modules/Gloda.sys.mjs",
"mailnews/db/gloda/modules/GlodaDatabind.sys.mjs",
"mailnews/db/gloda/modules/GlodaDatastore.sys.mjs",
"mailnews/db/gloda/modules/GlodaFundAttr.sys.mjs",
"mailnews/db/gloda/modules/IndexMsg.sys.mjs",
"mailnews/db/gloda/modules/MimeMessage.sys.mjs",
"mailnews/db/gloda/test/unit/resources/GlodaQueryHelper.sys.mjs",
"mailnews/extensions/newsblog/FeedParser.sys.mjs",
"mailnews/extensions/newsblog/FeedUtils.sys.mjs",
"mailnews/extensions/newsblog/feed-subscriptions.js",
"mailnews/extensions/newsblog/newsblogOverlay.js",
"mailnews/extensions/newsblog/test/browser/browser_feedDisplay.js",
"mailnews/imap/src/ImapChannel.sys.mjs",
"mailnews/imap/src/ImapClient.sys.mjs",
"mailnews/import/content/csv-field-map.js",
"mailnews/jsaccount/modules/JSAccountUtils.sys.mjs",
"mailnews/local/src/Pop3Client.sys.mjs",
"mailnews/news/src/NntpMessageService.sys.mjs",
"mailnews/search/content/FilterEditor.js",
"mailnews/test/fakeserver/Binaryd.sys.mjs",
"mailnews/test/fakeserver/Imapd.sys.mjs",
"mailnews/test/fakeserver/Maild.sys.mjs",
],
rules: {
"no-redeclare": ["error", { builtinGlobals: true }],
"no-shadow": "error",
},
},
],
};