summaryrefslogtreecommitdiff
path: root/tools/eslint/conf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/conf')
-rw-r--r--tools/eslint/conf/category-list.json7
-rw-r--r--tools/eslint/conf/environments.js2
-rw-r--r--tools/eslint/conf/eslint-all.js11
-rwxr-xr-x[-rw-r--r--]tools/eslint/conf/eslint.json5
4 files changed, 17 insertions, 8 deletions
diff --git a/tools/eslint/conf/category-list.json b/tools/eslint/conf/category-list.json
index d7e84b6c15..b5020c1f00 100644
--- a/tools/eslint/conf/category-list.json
+++ b/tools/eslint/conf/category-list.json
@@ -8,6 +8,11 @@
{ "name": "Stylistic Issues", "description": "These rules relate to style guidelines, and are therefore quite subjective:" },
{ "name": "ECMAScript 6", "description": "These rules relate to ES6, also known as ES2015:" }
],
+ "deprecated": {
+ "name": "Deprecated",
+ "description": "These rules have been deprecated and replaced by newer rules:",
+ "rules": []
+ },
"removed": {
"name": "Removed",
"description": "These rules from older versions of ESLint have been replaced by newer rules:",
@@ -32,4 +37,4 @@
{ "removed": "spaced-line-comment", "replacedBy": ["spaced-comment"] }
]
}
-} \ No newline at end of file
+}
diff --git a/tools/eslint/conf/environments.js b/tools/eslint/conf/environments.js
index d938a6cfaa..a11f2963dc 100644
--- a/tools/eslint/conf/environments.js
+++ b/tools/eslint/conf/environments.js
@@ -8,7 +8,7 @@
// Requirements
//------------------------------------------------------------------------------
-let globals = require("globals");
+const globals = require("globals");
//------------------------------------------------------------------------------
// Public Interface
diff --git a/tools/eslint/conf/eslint-all.js b/tools/eslint/conf/eslint-all.js
index 53d5cdb82d..28d745a921 100644
--- a/tools/eslint/conf/eslint-all.js
+++ b/tools/eslint/conf/eslint-all.js
@@ -9,17 +9,16 @@
// Requirements
//------------------------------------------------------------------------------
-let fs = require("fs"),
- path = require("path");
+const load = require("../lib/load-rules"),
+ rules = require("../lib/rules");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
-let ruleFiles = fs.readdirSync(path.resolve(__dirname, "../lib/rules"));
-let enabledRules = ruleFiles.reduce(function(result, filename) {
- if (path.extname(filename) === ".js") {
- result[path.basename(filename, ".js")] = "error";
+const enabledRules = Object.keys(load()).reduce((result, ruleId) => {
+ if (!rules.get(ruleId).meta.deprecated) {
+ result[ruleId] = "error";
}
return result;
}, {});
diff --git a/tools/eslint/conf/eslint.json b/tools/eslint/conf/eslint.json
index 53b2e75590..3d7779ea06 100644..100755
--- a/tools/eslint/conf/eslint.json
+++ b/tools/eslint/conf/eslint.json
@@ -41,6 +41,7 @@
"no-fallthrough": "error",
"no-floating-decimal": "off",
"no-func-assign": "error",
+ "no-global-assign": "off",
"no-implicit-coercion": "off",
"no-implicit-globals": "off",
"no-implied-eval": "off",
@@ -113,6 +114,7 @@
"no-unneeded-ternary": "off",
"no-unreachable": "error",
"no-unsafe-finally": "error",
+ "no-unsafe-negation": "off",
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-unused-vars": "error",
@@ -152,6 +154,7 @@
"dot-notation": "off",
"eol-last": "off",
"eqeqeq": "off",
+ "func-call-spacing": "off",
"func-names": "off",
"func-style": "off",
"generator-star-spacing": "off",
@@ -204,6 +207,7 @@
"rest-spread-spacing": "off",
"semi": "off",
"semi-spacing": "off",
+ "sort-keys": "off",
"sort-imports": "off",
"sort-vars": "off",
"space-before-blocks": "off",
@@ -221,6 +225,7 @@
"vars-on-top": "off",
"wrap-iife": "off",
"wrap-regex": "off",
+ "no-template-curly-in-string": "off",
"yield-star-spacing": "off",
"yoda": "off"
}