зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
a0fee45dbc
Коммит
0ce286101c
29
.eslintrc.js
29
.eslintrc.js
|
@ -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,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
"plugin:mozilla/recommended"
|
||||
],
|
||||
"rules": {
|
||||
// Warn about cyclomatic complexity in functions.
|
||||
"complexity": ["error", 42],
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
"plugin:mozilla/recommended"
|
||||
]
|
||||
};
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
"plugin:mozilla/recommended",
|
||||
"plugin:mozilla/browser-test",
|
||||
"plugin:mozilla/chrome-test",
|
||||
"plugin:mozilla/mochitest-test",
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
"plugin:mozilla/recommended"
|
||||
],
|
||||
|
||||
"plugins": [
|
||||
"spidermonkey-js"
|
||||
],
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
extends: [
|
||||
"plugin:mozilla/recommended"
|
||||
],
|
||||
|
||||
globals: {
|
||||
// TODO: Create custom rule for `Cu.import`
|
||||
"AddonManager": false,
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
extends: [
|
||||
"plugin:mozilla/recommended"
|
||||
],
|
||||
|
||||
plugins: [
|
||||
"mozilla"
|
||||
]
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
"plugin:mozilla/recommended"
|
||||
],
|
||||
};
|
|
@ -1,14 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
"plugin:mozilla/recommended"
|
||||
],
|
||||
|
||||
"plugins": [
|
||||
"mozilla"
|
||||
],
|
||||
|
||||
"env": {
|
||||
"node": true
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
extends: [
|
||||
"plugin:mozilla/recommended"
|
||||
],
|
||||
|
||||
plugins: [
|
||||
"mozilla"
|
||||
]
|
||||
}
|
|
@ -14,14 +14,6 @@ module.exports = {
|
|||
"node": true
|
||||
},
|
||||
|
||||
"plugins": [
|
||||
"mozilla"
|
||||
],
|
||||
|
||||
"extends": [
|
||||
"plugin:mozilla/recommended"
|
||||
],
|
||||
|
||||
"rules": {
|
||||
"camelcase": "error",
|
||||
"comma-dangle": ["error", "never"],
|
||||
|
|
Загрузка…
Ссылка в новой задаче