Skip to content

Commit 130bf88

Browse files
regseblydell
andauthored
Move removed rules to deprecated section (#245)
Co-authored-by: Simon Lydell <simon.lydell@gmail.com>
1 parent a157136 commit 130bf88

File tree

2 files changed

+40
-14
lines changed

2 files changed

+40
-14
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Extending `"prettier"` turns off a bunch of core ESLint rules, as well as a few
4545
4646
### Excluding deprecated rules
4747

48-
Some of the rules that eslint-config-prettier turns off may be deprecated. **This is perfectly fine,** but if you really need to omit the deprecated rules, you can do so by setting the `ESLINT_CONFIG_PRETTIER_NO_DEPRECATED` environment variable to a non-empty value. For example:
48+
Some of the rules that eslint-config-prettier turns off may be deprecated, or even removed from ESLint. **This is perfectly fine,** but if you really need to omit the deprecated and removed rules, you can do so by setting the `ESLINT_CONFIG_PRETTIER_NO_DEPRECATED` environment variable to a non-empty value. For example:
4949

5050
```
5151
env ESLINT_CONFIG_PRETTIER_NO_DEPRECATED=true npx eslint-find-rules --deprecated index.js

index.js

+39-13
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ module.exports = {
3737
"func-call-spacing": "off",
3838
"function-call-argument-newline": "off",
3939
"function-paren-newline": "off",
40-
"generator-star": "off",
4140
"generator-star-spacing": "off",
4241
"implicit-arrow-linebreak": "off",
4342
"indent": "off",
@@ -48,19 +47,14 @@ module.exports = {
4847
"multiline-ternary": "off",
4948
"newline-per-chained-call": "off",
5049
"new-parens": "off",
51-
"no-arrow-condition": "off",
52-
"no-comma-dangle": "off",
5350
"no-extra-parens": "off",
5451
"no-extra-semi": "off",
5552
"no-floating-decimal": "off",
5653
"no-mixed-spaces-and-tabs": "off",
5754
"no-multi-spaces": "off",
5855
"no-multiple-empty-lines": "off",
59-
"no-reserved-keys": "off",
60-
"no-space-before-semi": "off",
6156
"no-trailing-spaces": "off",
6257
"no-whitespace-before-property": "off",
63-
"no-wrap-func": "off",
6458
"nonblock-statement-body-position": "off",
6559
"object-curly-newline": "off",
6660
"object-curly-spacing": "off",
@@ -73,18 +67,11 @@ module.exports = {
7367
"semi": "off",
7468
"semi-spacing": "off",
7569
"semi-style": "off",
76-
"space-after-function-name": "off",
77-
"space-after-keywords": "off",
7870
"space-before-blocks": "off",
7971
"space-before-function-paren": "off",
80-
"space-before-function-parentheses": "off",
81-
"space-before-keywords": "off",
82-
"space-in-brackets": "off",
8372
"space-in-parens": "off",
8473
"space-infix-ops": "off",
85-
"space-return-throw-case": "off",
8674
"space-unary-ops": "off",
87-
"space-unary-word-ops": "off",
8875
"switch-colon-spacing": "off",
8976
"template-curly-spacing": "off",
9077
"template-tag-spacing": "off",
@@ -183,12 +170,51 @@ module.exports = {
183170
"vue/template-curly-spacing": "off",
184171

185172
...(includeDeprecated && {
173+
// Removed in version 1.0.0.
174+
// https://eslint.org/docs/latest/rules/generator-star
175+
"generator-star": "off",
186176
// Deprecated since version 4.0.0.
187177
// https://github.com/eslint/eslint/pull/8286
188178
"indent-legacy": "off",
179+
// Removed in version 2.0.0.
180+
// https://eslint.org/docs/latest/rules/no-arrow-condition
181+
"no-arrow-condition": "off",
182+
// Removed in version 1.0.0.
183+
// https://eslint.org/docs/latest/rules/no-comma-dangle
184+
"no-comma-dangle": "off",
185+
// Removed in version 1.0.0.
186+
// https://eslint.org/docs/latest/rules/no-reserved-keys
187+
"no-reserved-keys": "off",
188+
// Removed in version 1.0.0.
189+
// https://eslint.org/docs/latest/rules/no-space-before-semi
190+
"no-space-before-semi": "off",
189191
// Deprecated since version 3.3.0.
190192
// https://eslint.org/docs/rules/no-spaced-func
191193
"no-spaced-func": "off",
194+
// Removed in version 1.0.0.
195+
// https://eslint.org/docs/latest/rules/no-wrap-func
196+
"no-wrap-func": "off",
197+
// Removed in version 1.0.0.
198+
// https://eslint.org/docs/latest/rules/space-after-function-name
199+
"space-after-function-name": "off",
200+
// Removed in version 2.0.0.
201+
// https://eslint.org/docs/latest/rules/space-after-keywords
202+
"space-after-keywords": "off",
203+
// Removed in version 1.0.0.
204+
// https://eslint.org/docs/latest/rules/space-before-function-parentheses
205+
"space-before-function-parentheses": "off",
206+
// Removed in version 2.0.0.
207+
// https://eslint.org/docs/latest/rules/space-before-keywords
208+
"space-before-keywords": "off",
209+
// Removed in version 1.0.0.
210+
// https://eslint.org/docs/latest/rules/space-in-brackets
211+
"space-in-brackets": "off",
212+
// Removed in version 2.0.0.
213+
// https://eslint.org/docs/latest/rules/space-return-throw-case
214+
"space-return-throw-case": "off",
215+
// Removed in version 0.10.0.
216+
// https://eslint.org/docs/latest/rules/space-unary-word-ops
217+
"space-unary-word-ops": "off",
192218
// Deprecated since version 7.0.0.
193219
// https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md#700---2017-05-06
194220
"react/jsx-space-before-closing": "off",

0 commit comments

Comments
 (0)