Skip to content

Commit

Permalink
Breaking: add some rules to eslint:recommended (refs #14673) (#14691)
Browse files Browse the repository at this point in the history
* no-loss-of-precision
* no-unsafe-optional-chaining
* no-useless-backreference
* no-nonoctal-decimal-escape
  • Loading branch information
aladdin-add committed Aug 5, 2021
1 parent 86bb63b commit 8cce06c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions conf/eslint-recommended.js
Expand Up @@ -42,9 +42,11 @@ module.exports = {
"no-inner-declarations": "error",
"no-invalid-regexp": "error",
"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",
"no-octal": "error",
"no-prototype-builtins": "error",
Expand All @@ -60,8 +62,10 @@ module.exports = {
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": "error",
"no-unsafe-optional-chaining": "error",
"no-unused-labels": "error",
"no-unused-vars": "error",
"no-useless-backreference": "error",
"no-useless-catch": "error",
"no-useless-escape": "error",
"no-with": "error",
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-loss-of-precision.js
Expand Up @@ -16,7 +16,7 @@ module.exports = {
docs: {
description: "disallow literal numbers that lose precision",
category: "Possible Errors",
recommended: false,
recommended: true,
url: "https://eslint.org/docs/rules/no-loss-of-precision"
},
schema: [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-nonoctal-decimal-escape.js
Expand Up @@ -31,7 +31,7 @@ module.exports = {
docs: {
description: "disallow `\\8` and `\\9` escape sequences in string literals",
category: "Best Practices",
recommended: false,
recommended: true,
url: "https://eslint.org/docs/rules/no-nonoctal-decimal-escape",
suggestion: true
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-unsafe-optional-chaining.js
Expand Up @@ -25,7 +25,7 @@ module.exports = {
docs: {
description: "disallow use of optional chaining in contexts where the `undefined` value is not allowed",
category: "Possible Errors",
recommended: false,
recommended: true,
url: "https://eslint.org/docs/rules/no-unsafe-optional-chaining"
},
schema: [{
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-useless-backreference.js
Expand Up @@ -65,7 +65,7 @@ module.exports = {
docs: {
description: "disallow useless backreferences in regular expressions",
category: "Possible Errors",
recommended: false,
recommended: true,
url: "https://eslint.org/docs/rules/no-useless-backreference"
},

Expand Down

0 comments on commit 8cce06c

Please sign in to comment.