Bug 1434449 - Enable no-unused-vars for the global (as well as local) scope on jsm files, whitelist directories still to be fixed. r=florian.

MozReview-Commit-ID: 3vBWDR3UjGF

--HG--
extra : rebase_source : 61495d14a8d761e71b4072b02e2ca57e77f44059
This commit is contained in:
Mark Banner 2018-01-30 22:10:08 +00:00
parent b9f306bb12
commit 9a2172526a
4 changed files with 26 additions and 8 deletions

View File

@ -39,5 +39,23 @@ module.exports = {
"rules": {
"mozilla/use-services": "off",
}
}, {
// XXX Bug 1434446. These directories have jsm files still being fixed, so
// turn off global no-unused-vars checking for them.
"files": [
"accessible/**/*.jsm",
"browser/components/**/*.jsm",
"browser/extensions/**/*.jsm",
"services/sync/**/*.jsm",
"toolkit/**/*.jsm",
],
"rules": {
"mozilla/mark-exported-symbols-as-used": "error",
"no-unused-vars": ["error", {
"args": "none",
"vars": "local",
"varsIgnorePattern": "^Cc|Ci|Cu|Cr|EXPORTED_SYMBOLS"
}]
}
}]
};

View File

@ -70,12 +70,12 @@ module.exports = {
},
"files": "**/*.jsm",
"rules": {
"mozilla/mark-exported-symbols-as-used": "error"
// "no-unused-vars": ["error", {
// "args": "none",
// "vars": "all",
// "varsIgnorePattern": "^Cc|Ci|Cu|Cr|EXPORTED_SYMBOLS"
// }]
"mozilla/mark-exported-symbols-as-used": "error",
"no-unused-vars": ["error", {
"args": "none",
"vars": "all",
"varsIgnorePattern": "^Cc|Ci|Cu|Cr|EXPORTED_SYMBOLS"
}]
}
}],

View File

@ -1,6 +1,6 @@
{
"name": "eslint-plugin-mozilla",
"version": "0.6.0",
"version": "0.7.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "eslint-plugin-mozilla",
"version": "0.6.0",
"version": "0.7.0",
"description": "A collection of rules that help enforce JavaScript coding standard in the Mozilla project.",
"keywords": [
"eslint",