Skip to content

Commit

Permalink
feat!: Update eslint:recommended configuration (#17716)
Browse files Browse the repository at this point in the history
Adds new rules no-constant-binary-expression,
no-empty-static-block and no-unused-private-class-members.

Removes deprecated rules no-extra-semi and no-mixed-spaces-and-tabs.

Fixes #17596
  • Loading branch information
mdjermanovic committed Dec 20, 2023
1 parent c2cf85a commit 6ee3e9e
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/rules/no-constant-binary-expression.js
Expand Up @@ -440,7 +440,7 @@ module.exports = {
type: "problem",
docs: {
description: "Disallow expressions where the operation doesn't affect the value",
recommended: false,
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-constant-binary-expression"
},
schema: [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-empty-static-block.js
Expand Up @@ -15,7 +15,7 @@ module.exports = {

docs: {
description: "Disallow empty static blocks",
recommended: false,
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-empty-static-block"
},

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-extra-semi.js
Expand Up @@ -26,7 +26,7 @@ module.exports = {

docs: {
description: "Disallow unnecessary semicolons",
recommended: true,
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-extra-semi"
},

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-mixed-spaces-and-tabs.js
Expand Up @@ -18,7 +18,7 @@ module.exports = {

docs: {
description: "Disallow mixed spaces and tabs for indentation",
recommended: true,
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs"
},

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-unused-private-class-members.js
Expand Up @@ -16,7 +16,7 @@ module.exports = {

docs: {
description: "Disallow unused private class members",
recommended: false,
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-unused-private-class-members"
},

Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-eslint/base.js
Expand Up @@ -81,6 +81,7 @@ const jsConfigs = [js.configs.recommended, {
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-semi": "error",
"no-floating-decimal": "error",
"no-implied-eval": "error",
"no-invalid-this": "error",
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-eslint/eslintrc.js
Expand Up @@ -223,6 +223,7 @@ module.exports = {
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-semi": "error",
"no-floating-decimal": "error",
"no-implied-eval": "error",
"no-invalid-this": "error",
Expand Down
5 changes: 3 additions & 2 deletions packages/js/src/configs/eslint-recommended.js
Expand Up @@ -20,6 +20,7 @@ module.exports = Object.freeze({
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-const-assign": "error",
"no-constant-binary-expression": "error",
"no-constant-condition": "error",
"no-control-regex": "error",
"no-debugger": "error",
Expand All @@ -32,9 +33,9 @@ module.exports = Object.freeze({
"no-empty": "error",
"no-empty-character-class": "error",
"no-empty-pattern": "error",
"no-empty-static-block": "error",
"no-ex-assign": "error",
"no-extra-boolean-cast": "error",
"no-extra-semi": "error",
"no-fallthrough": "error",
"no-func-assign": "error",
"no-global-assign": "error",
Expand All @@ -44,7 +45,6 @@ module.exports = Object.freeze({
"no-irregular-whitespace": "error",
"no-loss-of-precision": "error",
"no-misleading-character-class": "error",
"no-mixed-spaces-and-tabs": "error",
"no-new-symbol": "error",
"no-nonoctal-decimal-escape": "error",
"no-obj-calls": "error",
Expand All @@ -64,6 +64,7 @@ module.exports = Object.freeze({
"no-unsafe-negation": "error",
"no-unsafe-optional-chaining": "error",
"no-unused-labels": "error",
"no-unused-private-class-members": "error",
"no-unused-vars": "error",
"no-useless-backreference": "error",
"no-useless-catch": "error",
Expand Down

0 comments on commit 6ee3e9e

Please sign in to comment.