Skip to content

Commit

Permalink
Breaking: eslint:recommended changes (fixes #10768) (#11518)
Browse files Browse the repository at this point in the history
  • Loading branch information
aladdin-add authored and not-an-aardvark committed Apr 26, 2019
1 parent 1c34d4a commit 0fc8e62
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/rules/no-async-promise-executor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-console.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-misleading-character-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-prototype-builtins.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-shadow-restricted-names.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-useless-catch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-with.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/require-atomic-updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},

Expand Down
6 changes: 0 additions & 6 deletions packages/eslint-config-eslint/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand All @@ -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"
Expand All @@ -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"]
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});

Expand Down
2 changes: 1 addition & 1 deletion tests/lib/config/config-initializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down

0 comments on commit 0fc8e62

Please sign in to comment.