Bug 1359011 - Make the mozilla/recommended eslint configuration the default for the whole tree. r=mossop

MozReview-Commit-ID: HtUW43tCli1

--HG--
extra : rebase_source : 6496bc47860d9c1ab522a78e73b41550700021cb
This commit is contained in:
Mark Banner 2017-04-25 20:12:21 +01:00
parent a0fee45dbc
commit 0ce286101c
15 changed files with 6 additions and 95 deletions

View File

@ -1,36 +1,19 @@
"use strict";
module.exports = {
// When adding items to this file please check for effects on sub-directories.
// New rules and configurations should generally be added in
// tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js to
// allow external repositories that use the plugin to pick them up as well.
"extends": [
"plugin:mozilla/recommended"
],
"plugins": [
"mozilla"
],
"rules": {
"mozilla/avoid-removeChild": "error",
"mozilla/avoid-nsISupportsString-preferences": "error",
"mozilla/import-browser-window-globals": "error",
"mozilla/import-globals": "warn",
"mozilla/no-import-into-var-and-global": "error",
"mozilla/no-useless-parameters": "error",
"mozilla/no-useless-removeEventListener": "error",
"mozilla/use-default-preference-values": "error",
"mozilla/use-ownerGlobal": "error",
// No (!foo in bar) or (!object instanceof Class)
"no-unsafe-negation": "error",
// No eval() and no strings in the first param of setTimeout or setInterval
"no-implied-eval": "error",
"no-eval": "error",
},
// The html plugin is enabled via a command line option on eslint. To avoid
// bad interactions with the xml preprocessor in eslint-plugin-mozilla, we
// turn off processing of the html plugin for .xml files.
"settings": {
"html/xml-extensions": [ ".xhtml" ]
},
"env": {
"es6": true
},
"parserOptions": {
"ecmaVersion": 8,
},
};

View File

@ -1,9 +1,6 @@
"use strict";
module.exports = {
"extends": [
"plugin:mozilla/recommended"
],
"rules": {
// Warn about cyclomatic complexity in functions.
"complexity": ["error", 42],

View File

@ -1,10 +1,6 @@
"use strict";
module.exports = {
"extends": [
"plugin:mozilla/recommended"
],
"rules": {
// XXX Bug 1326071 - This should be reduced down - probably to 20 or to
// be removed & synced with the mozilla/recommended value.

View File

@ -1,7 +0,0 @@
"use strict";
module.exports = {
"extends": [
"plugin:mozilla/recommended"
]
};

View File

@ -2,7 +2,6 @@
module.exports = {
"extends": [
"plugin:mozilla/recommended",
"plugin:mozilla/browser-test",
"plugin:mozilla/chrome-test",
"plugin:mozilla/mochitest-test",

View File

@ -1,10 +1,6 @@
"use strict";
module.exports = {
"extends": [
"plugin:mozilla/recommended"
],
"plugins": [
"spidermonkey-js"
],

View File

@ -1,10 +1,6 @@
"use strict";
module.exports = {
"extends": [
"plugin:mozilla/recommended"
],
"rules": {
// SpiderMonkey's style doesn't match any of the possible options.
"brace-style": "off",

View File

@ -1,10 +1,6 @@
"use strict";
module.exports = {
extends: [
"plugin:mozilla/recommended"
],
globals: {
// TODO: Create custom rule for `Cu.import`
"AddonManager": false,

View File

@ -1,9 +1,6 @@
"use strict";
module.exports = {
"extends": [
"plugin:mozilla/recommended"
],
"rules": {
// Enforce return statements in callbacks of array methods.
"array-callback-return": "error",

View File

@ -1,10 +1,6 @@
"use strict";
module.exports = {
extends: [
"plugin:mozilla/recommended"
],
plugins: [
"mozilla"
]

View File

@ -1,7 +0,0 @@
"use strict";
module.exports = {
"extends": [
"plugin:mozilla/recommended"
],
};

View File

@ -1,14 +1,6 @@
"use strict";
module.exports = {
"extends": [
"plugin:mozilla/recommended"
],
"plugins": [
"mozilla"
],
"env": {
"node": true
}

View File

@ -1,10 +1,6 @@
"use strict";
module.exports = {
extends: [
"plugin:mozilla/recommended"
],
rules: {
// XXX Bug 1326071 - This should be reduced down - probably to 20 or to
// be removed & synced with the mozilla/recommended value.

View File

@ -1,11 +0,0 @@
"use strict";
module.exports = {
extends: [
"plugin:mozilla/recommended"
],
plugins: [
"mozilla"
]
}

View File

@ -14,14 +14,6 @@ module.exports = {
"node": true
},
"plugins": [
"mozilla"
],
"extends": [
"plugin:mozilla/recommended"
],
"rules": {
"camelcase": "error",
"comma-dangle": ["error", "never"],