7e1d92461a
See http://eslint.org/docs/rules/consistent-return; it appears that I overlooked this rule in PR 7982. Also adds the http://eslint.org/docs/rules/no-nested-ternary rule, which didn't require any code changes, since that rule is being enforced in mozilla-central. Re: issue 7957.
39 lines
933 B
Plaintext
39 lines
933 B
Plaintext
{
|
|
"extends": [
|
|
../../.eslintrc
|
|
],
|
|
|
|
"parserOptions": {
|
|
"ecmaVersion": 6
|
|
},
|
|
|
|
"rules": {
|
|
// Best Practices
|
|
"consistent-return": "error",
|
|
|
|
// Variables
|
|
"no-shadow": "error",
|
|
"no-unused-vars": ["error", {
|
|
"vars": "local",
|
|
"varsIgnorePattern": "^Cc|Ci|Cu|Cr|EXPORTED_SYMBOLS",
|
|
"args": "none",
|
|
}],
|
|
|
|
// Stylistic Issues
|
|
"no-nested-ternary": "error",
|
|
"quotes": ["error", "double"],
|
|
"space-before-function-paren": ["error", "never"],
|
|
|
|
// ECMAScript 6
|
|
"arrow-body-style": ["error", "as-needed"],
|
|
"arrow-parens": ["error", "always"],
|
|
"arrow-spacing": ["error", { "before": true, "after": true, }],
|
|
"constructor-super": "error",
|
|
"no-confusing-arrow": "error",
|
|
"no-const-assign": "error",
|
|
"no-dupe-class-members": "error",
|
|
"no-useless-constructor": "error",
|
|
"object-shorthand": ["error", "always", { "avoidQuotes": true }],
|
|
},
|
|
}
|