Skip to content

Commit

Permalink
Move rules deprecated in ESLint 8.53.0 to the deprecated section
Browse files Browse the repository at this point in the history
  • Loading branch information
lydell committed Dec 2, 2023
1 parent 24445c0 commit 4c876b9
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 90 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Example ESLint configuration:
}
```

### [lines-around-comment]
### [lines-around-comment] \(deprecated)

(The following applies to [@typescript-eslint/lines-around-comment] as well.)

Expand Down Expand Up @@ -334,7 +334,7 @@ Example ESLint configuration:
}
```

### [max-len]
### [max-len] \(deprecated)

(The following applies to [vue/max-len] as well.)

Expand All @@ -357,7 +357,7 @@ Example ESLint configuration:
}
```

### [no-confusing-arrow]
### [no-confusing-arrow] \(deprecated)

**This rule requires certain options.**

Expand Down Expand Up @@ -407,7 +407,7 @@ Example ESLint configuration:

(Note: The CLI helper tool considers `{allowParens: true}` to be the default, which is the case since ESLint 6.0.0. The tool will produce a warning if you use the default even if you use an older version of ESLint. It doesn’t hurt to explicitly set `{allowParens: false}` even though it is technically redundant. This way you are prepared for a future ESLint upgrade and the CLI tool can be kept simple.)

### [no-mixed-operators]
### [no-mixed-operators] \(deprecated)

**This rule requires special attention when writing code.**

Expand Down Expand Up @@ -460,7 +460,7 @@ Example ESLint configuration:
}
```

### [no-tabs]
### [no-tabs] \(deprecated)

**This rule requires certain options.**

Expand Down Expand Up @@ -546,7 +546,7 @@ Example configuration:
}
```

### [quotes]
### [quotes] \(deprecated)

(The following applies to [babel/quotes] and [@typescript-eslint/quotes] as well.)

Expand Down
136 changes: 70 additions & 66 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@ const specialRule = 0;
module.exports = {
rules: {
// The following rules can be used in some cases. See the README for more
// information. (These are marked with `0` instead of `"off"` so that a
// script can distinguish them.)
// information. These are marked with `0` instead of `"off"` so that a
// script can distinguish them. Note that there are a few more of these
// in the deprecated section below.
"curly": specialRule,
"lines-around-comment": specialRule,
"max-len": specialRule,
"no-confusing-arrow": specialRule,
"no-mixed-operators": specialRule,
"no-tabs": specialRule,
"no-unexpected-multiline": specialRule,
"quotes": specialRule,
"@typescript-eslint/lines-around-comment": specialRule,
"@typescript-eslint/quotes": specialRule,
"babel/quotes": specialRule,
Expand All @@ -25,64 +20,6 @@ module.exports = {
"vue/max-len": specialRule,

// The rest are rules that you never need to enable when using Prettier.
"array-bracket-newline": "off",
"array-bracket-spacing": "off",
"array-element-newline": "off",
"arrow-parens": "off",
"arrow-spacing": "off",
"block-spacing": "off",
"brace-style": "off",
"comma-dangle": "off",
"comma-spacing": "off",
"comma-style": "off",
"computed-property-spacing": "off",
"dot-location": "off",
"eol-last": "off",
"func-call-spacing": "off",
"function-call-argument-newline": "off",
"function-paren-newline": "off",
"generator-star-spacing": "off",
"implicit-arrow-linebreak": "off",
"indent": "off",
"jsx-quotes": "off",
"key-spacing": "off",
"keyword-spacing": "off",
"linebreak-style": "off",
"max-statements-per-line": "off",
"multiline-ternary": "off",
"newline-per-chained-call": "off",
"new-parens": "off",
"no-extra-parens": "off",
"no-extra-semi": "off",
"no-floating-decimal": "off",
"no-mixed-spaces-and-tabs": "off",
"no-multi-spaces": "off",
"no-multiple-empty-lines": "off",
"no-trailing-spaces": "off",
"no-whitespace-before-property": "off",
"nonblock-statement-body-position": "off",
"object-curly-newline": "off",
"object-curly-spacing": "off",
"object-property-newline": "off",
"one-var-declaration-per-line": "off",
"operator-linebreak": "off",
"padded-blocks": "off",
"quote-props": "off",
"rest-spread-spacing": "off",
"semi": "off",
"semi-spacing": "off",
"semi-style": "off",
"space-before-blocks": "off",
"space-before-function-paren": "off",
"space-in-parens": "off",
"space-infix-ops": "off",
"space-unary-ops": "off",
"switch-colon-spacing": "off",
"template-curly-spacing": "off",
"template-tag-spacing": "off",
"wrap-iife": "off",
"wrap-regex": "off",
"yield-star-spacing": "off",
"@babel/object-curly-spacing": "off",
"@babel/semi": "off",
"@typescript-eslint/block-spacing": "off",
Expand Down Expand Up @@ -205,6 +142,73 @@ module.exports = {
// https://github.com/eslint/eslint/pull/8286
"indent-legacy": "off",

// Deprecated since version 8.53.0.
// https://eslint.org/blog/2023/10/deprecating-formatting-rules/
"array-bracket-newline": "off",
"array-bracket-spacing": "off",
"array-element-newline": "off",
"arrow-parens": "off",
"arrow-spacing": "off",
"block-spacing": "off",
"brace-style": "off",
"comma-dangle": "off",
"comma-spacing": "off",
"comma-style": "off",
"computed-property-spacing": "off",
"dot-location": "off",
"eol-last": "off",
"func-call-spacing": "off",
"function-call-argument-newline": "off",
"function-paren-newline": "off",
"generator-star-spacing": "off",
"implicit-arrow-linebreak": "off",
"indent": "off",
"jsx-quotes": "off",
"key-spacing": "off",
"keyword-spacing": "off",
"linebreak-style": "off",
"lines-around-comment": specialRule,
"max-len": specialRule,
"max-statements-per-line": "off",
"multiline-ternary": "off",
"new-parens": "off",
"newline-per-chained-call": "off",
"no-confusing-arrow": specialRule,
"no-extra-parens": "off",
"no-extra-semi": "off",
"no-floating-decimal": "off",
"no-mixed-operators": specialRule,
"no-mixed-spaces-and-tabs": "off",
"no-multi-spaces": "off",
"no-multiple-empty-lines": "off",
"no-tabs": specialRule,
"no-trailing-spaces": "off",
"no-whitespace-before-property": "off",
"nonblock-statement-body-position": "off",
"object-curly-newline": "off",
"object-curly-spacing": "off",
"object-property-newline": "off",
"one-var-declaration-per-line": "off",
"operator-linebreak": "off",
"padded-blocks": "off",
"quote-props": "off",
"quotes": specialRule,
"rest-spread-spacing": "off",
"semi": "off",
"semi-spacing": "off",
"semi-style": "off",
"space-before-blocks": "off",
"space-before-function-paren": "off",
"space-in-parens": "off",
"space-infix-ops": "off",
"space-unary-ops": "off",
"switch-colon-spacing": "off",
"template-curly-spacing": "off",
"template-tag-spacing": "off",
"wrap-iife": "off",
"wrap-regex": "off",
"yield-star-spacing": "off",

// Deprecated since version 7.0.0.
// https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md#700---2017-05-06
"react/jsx-space-before-closing": "off",
Expand Down
34 changes: 17 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@babel/plugin-transform-react-jsx": "7.23.4",
"@typescript-eslint/eslint-plugin": "6.13.1",
"@typescript-eslint/parser": "6.13.1",
"eslint": "8.52.0",
"eslint": "8.55.0",
"eslint-config-google": "0.14.0",
"eslint-find-rules": "4.1.0",
"eslint-plugin-babel": "5.3.1",
Expand Down

0 comments on commit 4c876b9

Please sign in to comment.