Skip to content
Permalink
Browse files

Breaking: eslint:recommended changes (fixes #10768) (#11518)

  • Loading branch information...
aladdin-add authored and not-an-aardvark committed Apr 26, 2019
1 parent 1c34d4a commit 0fc8e62818bc8d0a0a804b59c6110818844df5f3
@@ -15,7 +15,7 @@ module.exports = {
docs: {
description: "disallow using an async function as a Promise executor",
category: "Possible Errors",
recommended: false,
recommended: true,
url: "https://eslint.org/docs/rules/no-async-promise-executor"
},

@@ -22,7 +22,7 @@ module.exports = {
docs: {
description: "disallow the use of `console`",
category: "Possible Errors",
recommended: true,
recommended: false,
url: "https://eslint.org/docs/rules/no-console"
},

@@ -106,7 +106,7 @@ module.exports = {
docs: {
description: "disallow characters which are made with multiple code points in character class syntax",
category: "Possible Errors",
recommended: false,
recommended: true,
url: "https://eslint.org/docs/rules/no-misleading-character-class"
},

@@ -15,7 +15,7 @@ module.exports = {
docs: {
description: "disallow calling some `Object.prototype` methods directly on objects",
category: "Possible Errors",
recommended: false,
recommended: true,
url: "https://eslint.org/docs/rules/no-prototype-builtins"
},

@@ -28,7 +28,7 @@ module.exports = {
docs: {
description: "disallow identifiers from shadowing restricted names",
category: "Variables",
recommended: false,
recommended: true,
url: "https://eslint.org/docs/rules/no-shadow-restricted-names"
},

@@ -16,7 +16,7 @@ module.exports = {
docs: {
description: "disallow unnecessary `catch` clauses",
category: "Best Practices",
recommended: false,
recommended: true,
url: "https://eslint.org/docs/rules/no-useless-catch"
},

@@ -16,7 +16,7 @@ module.exports = {
docs: {
description: "disallow `with` statements",
category: "Best Practices",
recommended: false,
recommended: true,
url: "https://eslint.org/docs/rules/no-with"
},

@@ -17,7 +17,7 @@ module.exports = {
docs: {
description: "disallow assignments that can lead to race conditions due to usage of `await` or `yield`",
category: "Possible Errors",
recommended: false,
recommended: true,
url: "https://eslint.org/docs/rules/require-atomic-updates"
},

@@ -50,7 +50,6 @@ rules:
new-parens: "error"
no-alert: "error"
no-array-constructor: "error"
no-async-promise-executor: "error"
no-buffer-constructor: "error"
no-caller: "error"
no-confusing-arrow: "error"
@@ -87,7 +86,6 @@ rules:
no-path-concat: "error"
no-process-exit: "error"
no-proto: "error"
no-prototype-builtins: "error"
no-redeclare: "error"
no-restricted-properties: [
"error",
@@ -104,7 +102,6 @@ rules:
no-self-compare: "error"
no-sequences: "error"
no-shadow: "error"
no-shadow-restricted-names: "error"
no-tabs: "error"
no-throw-literal: "error"
no-trailing-spaces: "error"
@@ -118,15 +115,13 @@ rules:
no-unused-vars: ["error", {vars: "all", args: "after-used"}]
no-use-before-define: "error"
no-useless-call: "error"
no-useless-catch: "error"
no-useless-computed-key: "error"
no-useless-concat: "error"
no-useless-constructor: "error"
no-useless-escape: "error"
no-useless-rename: "error"
no-useless-return: "error"
no-whitespace-before-property: "error"
no-with: "error"
no-var: "error"
object-curly-newline: ["error", { "consistent": true, "multiline": true }]
object-curly-spacing: ["error", "always"]
@@ -158,7 +153,6 @@ rules:
quotes: ["error", "double", {avoidEscape: true}]
quote-props: ["error", "as-needed"]
radix: "error"
require-atomic-updates: "error"
require-jsdoc: "error"
require-unicode-regexp: "error"
rest-spread-spacing: "error"
@@ -467,7 +467,7 @@ describe("cli", () => {

cli.execute(`--no-eslintrc --config ./conf/eslint-recommended.js --no-ignore ${files.join(" ")}`);

assert.strictEqual(log.info.args[0][0].split("\n").length, 11);
assert.strictEqual(log.info.args[0][0].split("\n").length, 10);
});
});

@@ -360,7 +360,7 @@ describe("configInitializer", () => {

it("should extend and not disable recommended rules", () => {
assert.strictEqual(config.extends, "eslint:recommended");
assert.notProperty(config.rules, "no-console");
assert.notProperty(config.rules, "no-debugger");
});

it("should support new ES features if using later ES version", () => {

0 comments on commit 0fc8e62

Please sign in to comment.
You can’t perform that action at this time.