Bug 1358948 - Remove redundant eslint "no-spaced-func" rules and standardize on new "func-call-spacing" name. r?standard8
The "no-spaced-func" name was deprecated in ESLint v3.3.0 and replaced by "func-call-spacing", which is already specified in the mozilla/recommended rules and some other .eslintrc.js files. We need to specify func-call-spacing in accessible/tests/browser/.eslintrc.js because it doesn't inherit the mozilla/recommended rules.
MozReview-Commit-ID: 7L8fuVtTu0X
--- a/accessible/tests/browser/.eslintrc.js
+++ b/accessible/tests/browser/.eslintrc.js
@@ -65,16 +65,17 @@ module.exports = { // eslint-disable-lin
"complexity": ["error", 35],
"consistent-this": "off",
"curly": ["error", "multi-line"],
"default-case": "off",
"dot-location": ["error", "property"],
"dot-notation": "error",
"eol-last": "error",
"eqeqeq": "off",
+ "func-call-spacing": "error",
"func-names": "off",
"func-style": "off",
"generator-star": "off",
"global-strict": "off",
"handle-callback-err": ["error", "er"],
"indent": ["error", 2, {"SwitchCase": 1}],
"key-spacing": ["error", {"beforeColon": false, "afterColon": true}],
"linebreak-style": "off",
@@ -136,17 +137,16 @@ module.exports = { // eslint-disable-lin
"no-restricted-modules": "off",
"no-return-assign": "error",
"no-script-url": "off",
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow": "error",
"no-shadow-restricted-names": "error",
"no-space-before-semi": "off",
- "no-spaced-func": "error",
"no-sparse-arrays": "error",
"no-sync": "off",
"no-ternary": "off",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef": "error",
"no-underscore-dangle": "off",
"no-undefined": "off",
--- a/browser/.eslintrc.js
+++ b/browser/.eslintrc.js
@@ -12,19 +12,16 @@ module.exports = {
// Disallow empty statements. This will report an error for:
// try { something(); } catch (e) {}
// but will not report it for:
// try { something(); } catch (e) { /* Silencing the error because ...*/ }
// which is a valid use case.
"no-empty": "error",
- // No spaces between function name and parentheses
- "no-spaced-func": "error",
-
// Maximum depth callbacks can be nested.
"max-nested-callbacks": ["error", 8],
// Disallow adding to native types
"no-extend-native": "error",
"no-mixed-spaces-and-tabs": "error",
"no-shadow": "error",
--- a/security/manager/.eslintrc.js
+++ b/security/manager/.eslintrc.js
@@ -24,19 +24,16 @@ module.exports = {
"default-case": "error",
// Require `foo.bar` dot notation instead of `foo["bar"]` notation.
"dot-notation": "error",
// Always require a trailing EOL
"eol-last": "error",
- // No spaces between function name and parentheses.
- "func-call-spacing": ["error", "never"],
-
// Require function* name()
"generator-star-spacing": ["error", {"before": false, "after": true}],
// Space after colon not before in property declarations
"key-spacing": ["error", { "beforeColon": false, "afterColon": true, "mode": "minimum" }],
// Always require parenthesis for new calls
"new-parens": "error",
--- a/toolkit/components/extensions/.eslintrc.js
+++ b/toolkit/components/extensions/.eslintrc.js
@@ -97,19 +97,16 @@ module.exports = {
// No mixing different operators without parens
"no-mixed-operators": ["error", {"groups": [["&&", "||"], ["==", "!=", "===", "!==", ">", ">=", "<", "<="], ["in", "instanceof"]]}],
// Disallow use of multiple spaces (sometimes used to align const values,
// array or object items, etc.). It's hard to maintain and doesn't add that
// much benefit.
"no-multi-spaces": "warn",
- // No spaces between function name and parentheses
- "no-spaced-func": "warn",
-
// No expressions where a statement is expected
"no-unused-expressions": "error",
// No declaring variables that are never used
"no-unused-vars": ["error", {"args": "none", "varsIgnorePattern": "^(Cc|Ci|Cr|Cu|EXPORTED_SYMBOLS)$"}],
// No using variables before defined
"no-use-before-define": "error",
--- a/toolkit/components/narrate/.eslintrc.js
+++ b/toolkit/components/narrate/.eslintrc.js
@@ -63,17 +63,16 @@ module.exports = {
"no-native-reassign": "error",
"no-nested-ternary": "error",
"no-redeclare": "error",
"no-return-assign": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow": "warn",
"no-shadow-restricted-names": "error",
- "no-spaced-func": "warn",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef": "error",
"no-unneeded-ternary": "error",
"no-unreachable": "error",
"no-unused-vars": "error",
"no-with": "error",
"padded-blocks": ["warn", "never"],
--- a/toolkit/components/reader/.eslintrc.js
+++ b/toolkit/components/reader/.eslintrc.js
@@ -128,19 +128,16 @@ module.exports = {
"no-self-compare": "error",
// No declaring variables from an outer scope
"no-shadow": "error",
// No declaring variables that hide things like arguments
"no-shadow-restricted-names": "error",
- // No spaces between function name and parentheses
- "no-spaced-func": "error",
-
// No trailing whitespace
"no-trailing-spaces": "error",
// No using undeclared variables
// "no-undef": "error",
// Error on newline where a semicolon is needed
"no-unexpected-multiline": "error",