eslint 9.20.0 → 9.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/README.md +13 -2
  2. package/conf/rule-type-list.json +82 -18
  3. package/lib/cli.js +23 -0
  4. package/lib/config/rule-validator.js +12 -2
  5. package/lib/eslint/eslint.js +7 -1
  6. package/lib/options.js +6 -0
  7. package/lib/rules/array-bracket-newline.js +20 -2
  8. package/lib/rules/array-bracket-spacing.js +20 -2
  9. package/lib/rules/array-element-newline.js +20 -2
  10. package/lib/rules/arrow-parens.js +20 -2
  11. package/lib/rules/arrow-spacing.js +20 -2
  12. package/lib/rules/block-spacing.js +20 -2
  13. package/lib/rules/brace-style.js +20 -2
  14. package/lib/rules/callback-return.js +19 -3
  15. package/lib/rules/comma-dangle.js +20 -2
  16. package/lib/rules/comma-spacing.js +20 -2
  17. package/lib/rules/comma-style.js +20 -2
  18. package/lib/rules/computed-property-spacing.js +20 -2
  19. package/lib/rules/dot-location.js +20 -2
  20. package/lib/rules/eol-last.js +20 -2
  21. package/lib/rules/func-call-spacing.js +20 -2
  22. package/lib/rules/function-call-argument-newline.js +20 -2
  23. package/lib/rules/function-paren-newline.js +20 -2
  24. package/lib/rules/generator-star-spacing.js +20 -2
  25. package/lib/rules/global-require.js +19 -3
  26. package/lib/rules/handle-callback-err.js +19 -3
  27. package/lib/rules/id-blacklist.js +14 -2
  28. package/lib/rules/implicit-arrow-linebreak.js +20 -2
  29. package/lib/rules/indent-legacy.js +19 -3
  30. package/lib/rules/indent.js +20 -2
  31. package/lib/rules/jsx-quotes.js +20 -2
  32. package/lib/rules/key-spacing.js +20 -2
  33. package/lib/rules/keyword-spacing.js +20 -2
  34. package/lib/rules/line-comment-position.js +20 -2
  35. package/lib/rules/linebreak-style.js +20 -2
  36. package/lib/rules/lines-around-comment.js +20 -2
  37. package/lib/rules/lines-around-directive.js +20 -2
  38. package/lib/rules/lines-between-class-members.js +20 -2
  39. package/lib/rules/max-len.js +20 -2
  40. package/lib/rules/max-statements-per-line.js +20 -2
  41. package/lib/rules/multiline-comment-style.js +20 -2
  42. package/lib/rules/multiline-ternary.js +20 -2
  43. package/lib/rules/new-parens.js +20 -2
  44. package/lib/rules/newline-after-var.js +20 -3
  45. package/lib/rules/newline-before-return.js +20 -2
  46. package/lib/rules/newline-per-chained-call.js +20 -2
  47. package/lib/rules/no-buffer-constructor.js +19 -3
  48. package/lib/rules/no-catch-shadow.js +14 -3
  49. package/lib/rules/no-confusing-arrow.js +20 -2
  50. package/lib/rules/no-extra-parens.js +20 -2
  51. package/lib/rules/no-extra-semi.js +20 -2
  52. package/lib/rules/no-floating-decimal.js +20 -2
  53. package/lib/rules/no-mixed-operators.js +20 -2
  54. package/lib/rules/no-mixed-requires.js +19 -3
  55. package/lib/rules/no-mixed-spaces-and-tabs.js +20 -2
  56. package/lib/rules/no-multi-spaces.js +20 -2
  57. package/lib/rules/no-multiple-empty-lines.js +20 -2
  58. package/lib/rules/no-native-reassign.js +14 -3
  59. package/lib/rules/no-negated-in-lhs.js +14 -3
  60. package/lib/rules/no-new-object.js +14 -5
  61. package/lib/rules/no-new-require.js +19 -3
  62. package/lib/rules/no-new-symbol.js +14 -5
  63. package/lib/rules/no-path-concat.js +19 -3
  64. package/lib/rules/no-process-env.js +19 -3
  65. package/lib/rules/no-process-exit.js +19 -3
  66. package/lib/rules/no-restricted-modules.js +19 -3
  67. package/lib/rules/no-return-await.js +7 -3
  68. package/lib/rules/no-spaced-func.js +20 -3
  69. package/lib/rules/no-sync.js +19 -3
  70. package/lib/rules/no-tabs.js +20 -2
  71. package/lib/rules/no-trailing-spaces.js +20 -2
  72. package/lib/rules/no-whitespace-before-property.js +20 -2
  73. package/lib/rules/nonblock-statement-body-position.js +20 -2
  74. package/lib/rules/object-curly-newline.js +20 -2
  75. package/lib/rules/object-curly-spacing.js +20 -2
  76. package/lib/rules/object-property-newline.js +20 -2
  77. package/lib/rules/one-var-declaration-per-line.js +20 -2
  78. package/lib/rules/operator-linebreak.js +20 -2
  79. package/lib/rules/padded-blocks.js +20 -2
  80. package/lib/rules/padding-line-between-statements.js +20 -2
  81. package/lib/rules/prefer-reflect.js +7 -3
  82. package/lib/rules/quote-props.js +20 -2
  83. package/lib/rules/quotes.js +20 -2
  84. package/lib/rules/rest-spread-spacing.js +20 -2
  85. package/lib/rules/semi-spacing.js +20 -2
  86. package/lib/rules/semi-style.js +20 -2
  87. package/lib/rules/semi.js +20 -2
  88. package/lib/rules/space-before-blocks.js +20 -2
  89. package/lib/rules/space-before-function-paren.js +20 -2
  90. package/lib/rules/space-in-parens.js +20 -2
  91. package/lib/rules/space-infix-ops.js +20 -2
  92. package/lib/rules/space-unary-ops.js +20 -2
  93. package/lib/rules/spaced-comment.js +20 -2
  94. package/lib/rules/switch-colon-spacing.js +20 -2
  95. package/lib/rules/template-curly-spacing.js +20 -2
  96. package/lib/rules/template-tag-spacing.js +20 -2
  97. package/lib/rules/wrap-iife.js +20 -2
  98. package/lib/rules/wrap-regex.js +20 -2
  99. package/lib/rules/yield-star-spacing.js +20 -2
  100. package/lib/shared/types.js +19 -1
  101. package/lib/types/index.d.ts +13 -5
  102. package/messages/config-plugin-missing.js +14 -0
  103. package/package.json +7 -7
package/README.md CHANGED
@@ -56,6 +56,17 @@ After that, you can run ESLint on any file or directory like this:
56
56
  npx eslint yourfile.js
57
57
  ```
58
58
 
59
+ ### pnpm Installation
60
+
61
+ To use ESLint with pnpm, we recommend setting up a `.npmrc` file with at least the following settings:
62
+
63
+ ```text
64
+ auto-install-peers=true
65
+ node-linker=hoisted
66
+ ```
67
+
68
+ This ensures that pnpm installs dependencies in a way that is more compatible with npm and is less likely to produce errors.
69
+
59
70
  ## Configuration
60
71
 
61
72
  You can configure rules in your `eslint.config.js` files as in this example:
@@ -308,8 +319,8 @@ to get your logo on our READMEs and [website](https://eslint.org/sponsors).
308
319
  <h3>Platinum Sponsors</h3>
309
320
  <p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
310
321
  <p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a></p><h3>Silver Sponsors</h3>
311
- <p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://www.serptriumph.com/"><img src="https://images.opencollective.com/serp-triumph5/fea3074/logo.png" alt="SERP Triumph" height="64"></a> <a href="https://www.jetbrains.com/"><img src="https://images.opencollective.com/jetbrains/fe76f99/logo.png" alt="JetBrains" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a></p><h3>Bronze Sponsors</h3>
312
- <p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nolebase.ayaka.io"><img src="https://avatars.githubusercontent.com/u/11081491" alt="Neko" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a></p>
322
+ <p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://www.jetbrains.com/"><img src="https://images.opencollective.com/jetbrains/fe76f99/logo.png" alt="JetBrains" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
323
+ <p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nolebase.ayaka.io"><img src="https://avatars.githubusercontent.com/u/11081491" alt="Neko" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
313
324
  <h3>Technology Sponsors</h3>
314
325
  Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
315
326
  <p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
@@ -6,24 +6,88 @@
6
6
  },
7
7
  "deprecated": [],
8
8
  "removed": [
9
- { "removed": "generator-star", "replacedBy": ["generator-star-spacing"] },
10
- { "removed": "global-strict", "replacedBy": ["strict"] },
11
- { "removed": "no-arrow-condition", "replacedBy": ["no-confusing-arrow", "no-constant-condition"] },
12
- { "removed": "no-comma-dangle", "replacedBy": ["comma-dangle"] },
13
- { "removed": "no-empty-class", "replacedBy": ["no-empty-character-class"] },
14
- { "removed": "no-empty-label", "replacedBy": ["no-labels"] },
15
- { "removed": "no-extra-strict", "replacedBy": ["strict"] },
16
- { "removed": "no-reserved-keys", "replacedBy": ["quote-props"] },
17
- { "removed": "no-space-before-semi", "replacedBy": ["semi-spacing"] },
18
- { "removed": "no-wrap-func", "replacedBy": ["no-extra-parens"] },
19
- { "removed": "space-after-function-name", "replacedBy": ["space-before-function-paren"] },
20
- { "removed": "space-after-keywords", "replacedBy": ["keyword-spacing"] },
21
- { "removed": "space-before-function-parentheses", "replacedBy": ["space-before-function-paren"] },
22
- { "removed": "space-before-keywords", "replacedBy": ["keyword-spacing"] },
23
- { "removed": "space-in-brackets", "replacedBy": ["object-curly-spacing", "array-bracket-spacing"] },
24
- { "removed": "space-return-throw-case", "replacedBy": ["keyword-spacing"] },
25
- { "removed": "space-unary-word-ops", "replacedBy": ["space-unary-ops"] },
26
- { "removed": "spaced-line-comment", "replacedBy": ["spaced-comment"] },
9
+ {
10
+ "removed": "generator-star",
11
+ "replacedBy": [{ "rule": { "name": "generator-star-spacing" } }]
12
+ },
13
+ {
14
+ "removed": "global-strict",
15
+ "replacedBy": [{ "rule": { "name": "strict" } }]
16
+ },
17
+ {
18
+ "removed": "no-arrow-condition",
19
+ "replacedBy": [
20
+ { "rule": { "name": "no-confusing-arrow" } },
21
+ { "rule": { "name": "no-constant-condition" } }
22
+ ]
23
+ },
24
+ {
25
+ "removed": "no-comma-dangle",
26
+ "replacedBy": [{ "rule": { "name": "comma-dangle" } }]
27
+ },
28
+ {
29
+ "removed": "no-empty-class",
30
+ "replacedBy": [{ "rule": { "name": "no-empty-character-class" } }]
31
+ },
32
+ {
33
+ "removed": "no-empty-label",
34
+ "replacedBy": [{ "rule": { "name": "no-labels" } }]
35
+ },
36
+ {
37
+ "removed": "no-extra-strict",
38
+ "replacedBy": [{ "rule": { "name": "strict" } }]
39
+ },
40
+ {
41
+ "removed": "no-reserved-keys",
42
+ "replacedBy": [{ "rule": { "name": "quote-props" } }]
43
+ },
44
+ {
45
+ "removed": "no-space-before-semi",
46
+ "replacedBy": [{ "rule": { "name": "semi-spacing" } }]
47
+ },
48
+ {
49
+ "removed": "no-wrap-func",
50
+ "replacedBy": [{ "rule": { "name": "no-extra-parens" } }]
51
+ },
52
+ {
53
+ "removed": "space-after-function-name",
54
+ "replacedBy": [
55
+ { "rule": { "name": "space-before-function-paren" } }
56
+ ]
57
+ },
58
+ {
59
+ "removed": "space-after-keywords",
60
+ "replacedBy": [{ "rule": { "name": "keyword-spacing" } }]
61
+ },
62
+ {
63
+ "removed": "space-before-function-parentheses",
64
+ "replacedBy": [
65
+ { "rule": { "name": "space-before-function-paren" } }
66
+ ]
67
+ },
68
+ {
69
+ "removed": "space-before-keywords",
70
+ "replacedBy": [{ "rule": { "name": "keyword-spacing" } }]
71
+ },
72
+ {
73
+ "removed": "space-in-brackets",
74
+ "replacedBy": [
75
+ { "rule": { "name": "object-curly-spacing" } },
76
+ { "rule": { "name": "array-bracket-spacing" } }
77
+ ]
78
+ },
79
+ {
80
+ "removed": "space-return-throw-case",
81
+ "replacedBy": [{ "rule": { "name": "keyword-spacing" } }]
82
+ },
83
+ {
84
+ "removed": "space-unary-word-ops",
85
+ "replacedBy": [{ "rule": { "name": "space-unary-ops" } }]
86
+ },
87
+ {
88
+ "removed": "spaced-line-comment",
89
+ "replacedBy": [{ "rule": { "name": "spaced-comment" } }]
90
+ },
27
91
  { "removed": "valid-jsdoc", "replacedBy": [] },
28
92
  { "removed": "require-jsdoc", "replacedBy": [] }
29
93
  ]
package/lib/cli.js CHANGED
@@ -192,6 +192,12 @@ async function translateOptions({
192
192
  overrideConfig[0].plugins = await loadPlugins(importer, plugin);
193
193
  }
194
194
 
195
+ if (ext) {
196
+ overrideConfig.push({
197
+ files: ext.map(extension => `**/*${extension.startsWith(".") ? "" : "."}${extension}`)
198
+ });
199
+ }
200
+
195
201
  } else {
196
202
  overrideConfigFile = config;
197
203
 
@@ -489,6 +495,23 @@ const cli = {
489
495
  return 2;
490
496
  }
491
497
 
498
+ if (usingFlatConfig && options.ext) {
499
+
500
+ // Passing `--ext ""` results in `options.ext` being an empty array.
501
+ if (options.ext.length === 0) {
502
+ log.error("The --ext option value cannot be empty.");
503
+ return 2;
504
+ }
505
+
506
+ // Passing `--ext ,ts` results in an empty string at index 0. Passing `--ext ts,,tsx` results in an empty string at index 1.
507
+ const emptyStringIndex = options.ext.indexOf("");
508
+
509
+ if (emptyStringIndex >= 0) {
510
+ log.error(`The --ext option arguments cannot be empty strings. Found an empty string at index ${emptyStringIndex}.`);
511
+ return 2;
512
+ }
513
+ }
514
+
492
515
  const ActiveESLint = usingFlatConfig ? ESLint : LegacyESLint;
493
516
  const eslintOptions = await translateOptions(options, usingFlatConfig ? "flat" : "eslintrc");
494
517
  const engine = new ActiveESLint(eslintOptions);
@@ -36,7 +36,10 @@ function throwRuleNotFoundError({ pluginName, ruleName }, config) {
36
36
  const ruleId = pluginName === "@" ? ruleName : `${pluginName}/${ruleName}`;
37
37
 
38
38
  const errorMessageHeader = `Key "rules": Key "${ruleId}"`;
39
- let errorMessage = `${errorMessageHeader}: Could not find plugin "${pluginName}".`;
39
+
40
+ let errorMessage = `${errorMessageHeader}: Could not find plugin "${pluginName}" in configuration.`;
41
+
42
+ const missingPluginErrorMessage = errorMessage;
40
43
 
41
44
  // if the plugin exists then we need to check if the rule exists
42
45
  if (config.plugins && config.plugins[pluginName]) {
@@ -63,7 +66,14 @@ function throwRuleNotFoundError({ pluginName, ruleName }, config) {
63
66
  // falls through to throw error
64
67
  }
65
68
 
66
- throw new TypeError(errorMessage);
69
+ const error = new TypeError(errorMessage);
70
+
71
+ if (errorMessage === missingPluginErrorMessage) {
72
+ error.messageTemplate = "config-plugin-missing";
73
+ error.messageData = { pluginName, ruleId };
74
+ }
75
+
76
+ throw error;
67
77
  }
68
78
 
69
79
  /**
@@ -203,7 +203,13 @@ function getOrFindUsedDeprecatedRules(eslint, maybeFilePath) {
203
203
  const meta = rule && rule.meta;
204
204
 
205
205
  if (meta && meta.deprecated) {
206
- retv.push({ ruleId, replacedBy: meta.replacedBy || [] });
206
+ const usesNewFormat = typeof meta.deprecated === "object";
207
+
208
+ retv.push({
209
+ ruleId,
210
+ replacedBy: usesNewFormat ? meta.deprecated.replacedBy?.map(replacement => `${replacement.plugin?.name !== void 0 ? `${naming.getShorthandName(replacement.plugin.name, "eslint-plugin")}/` : ""}${replacement.rule?.name ?? ""}`) ?? [] : meta.replacedBy || [],
211
+ info: usesNewFormat ? meta.deprecated : void 0
212
+ });
207
213
  }
208
214
  }
209
215
  }
package/lib/options.js CHANGED
@@ -123,6 +123,12 @@ module.exports = function(usingFlatConfig) {
123
123
  type: "[String]",
124
124
  description: "Specify JavaScript file extensions"
125
125
  };
126
+ } else {
127
+ extFlag = {
128
+ option: "ext",
129
+ type: "[String]",
130
+ description: "Specify additional file extensions to lint"
131
+ };
126
132
  }
127
133
 
128
134
  let resolvePluginsFlag;
@@ -15,8 +15,26 @@ const astUtils = require("./utils/ast-utils");
15
15
  /** @type {import('../shared/types').Rule} */
16
16
  module.exports = {
17
17
  meta: {
18
- deprecated: true,
19
- replacedBy: [],
18
+ deprecated: {
19
+ message: "Formatting rules are being moved out of ESLint core.",
20
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
21
+ deprecatedSince: "8.53.0",
22
+ availableUntil: "10.0.0",
23
+ replacedBy: [
24
+ {
25
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
26
+ url: "https://eslint.style/guide/migration",
27
+ plugin: {
28
+ name: "@stylistic/eslint-plugin-js",
29
+ url: "https://eslint.style/packages/js"
30
+ },
31
+ rule: {
32
+ name: "array-bracket-newline",
33
+ url: "https://eslint.style/rules/js/array-bracket-newline"
34
+ }
35
+ }
36
+ ]
37
+ },
20
38
  type: "layout",
21
39
 
22
40
  docs: {
@@ -14,8 +14,26 @@ const astUtils = require("./utils/ast-utils");
14
14
  /** @type {import('../shared/types').Rule} */
15
15
  module.exports = {
16
16
  meta: {
17
- deprecated: true,
18
- replacedBy: [],
17
+ deprecated: {
18
+ message: "Formatting rules are being moved out of ESLint core.",
19
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
20
+ deprecatedSince: "8.53.0",
21
+ availableUntil: "10.0.0",
22
+ replacedBy: [
23
+ {
24
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
25
+ url: "https://eslint.style/guide/migration",
26
+ plugin: {
27
+ name: "@stylistic/eslint-plugin-js",
28
+ url: "https://eslint.style/packages/js"
29
+ },
30
+ rule: {
31
+ name: "array-bracket-spacing",
32
+ url: "https://eslint.style/rules/js/array-bracket-spacing"
33
+ }
34
+ }
35
+ ]
36
+ },
19
37
  type: "layout",
20
38
 
21
39
  docs: {
@@ -15,8 +15,26 @@ const astUtils = require("./utils/ast-utils");
15
15
  /** @type {import('../shared/types').Rule} */
16
16
  module.exports = {
17
17
  meta: {
18
- deprecated: true,
19
- replacedBy: [],
18
+ deprecated: {
19
+ message: "Formatting rules are being moved out of ESLint core.",
20
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
21
+ deprecatedSince: "8.53.0",
22
+ availableUntil: "10.0.0",
23
+ replacedBy: [
24
+ {
25
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
26
+ url: "https://eslint.style/guide/migration",
27
+ plugin: {
28
+ name: "@stylistic/eslint-plugin-js",
29
+ url: "https://eslint.style/packages/js"
30
+ },
31
+ rule: {
32
+ name: "array-element-newline",
33
+ url: "https://eslint.style/rules/js/array-element-newline"
34
+ }
35
+ }
36
+ ]
37
+ },
20
38
  type: "layout",
21
39
 
22
40
  docs: {
@@ -31,8 +31,26 @@ function hasBlockBody(node) {
31
31
  /** @type {import('../shared/types').Rule} */
32
32
  module.exports = {
33
33
  meta: {
34
- deprecated: true,
35
- replacedBy: [],
34
+ deprecated: {
35
+ message: "Formatting rules are being moved out of ESLint core.",
36
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
37
+ deprecatedSince: "8.53.0",
38
+ availableUntil: "10.0.0",
39
+ replacedBy: [
40
+ {
41
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
42
+ url: "https://eslint.style/guide/migration",
43
+ plugin: {
44
+ name: "@stylistic/eslint-plugin-js",
45
+ url: "https://eslint.style/packages/js"
46
+ },
47
+ rule: {
48
+ name: "arrow-parens",
49
+ url: "https://eslint.style/rules/js/arrow-parens"
50
+ }
51
+ }
52
+ ]
53
+ },
36
54
  type: "layout",
37
55
 
38
56
  docs: {
@@ -18,8 +18,26 @@ const astUtils = require("./utils/ast-utils");
18
18
  /** @type {import('../shared/types').Rule} */
19
19
  module.exports = {
20
20
  meta: {
21
- deprecated: true,
22
- replacedBy: [],
21
+ deprecated: {
22
+ message: "Formatting rules are being moved out of ESLint core.",
23
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
24
+ deprecatedSince: "8.53.0",
25
+ availableUntil: "10.0.0",
26
+ replacedBy: [
27
+ {
28
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
29
+ url: "https://eslint.style/guide/migration",
30
+ plugin: {
31
+ name: "@stylistic/eslint-plugin-js",
32
+ url: "https://eslint.style/packages/js"
33
+ },
34
+ rule: {
35
+ name: "arrow-spacing",
36
+ url: "https://eslint.style/rules/js/arrow-spacing"
37
+ }
38
+ }
39
+ ]
40
+ },
23
41
  type: "layout",
24
42
 
25
43
  docs: {
@@ -15,8 +15,26 @@ const util = require("./utils/ast-utils");
15
15
  /** @type {import('../shared/types').Rule} */
16
16
  module.exports = {
17
17
  meta: {
18
- deprecated: true,
19
- replacedBy: [],
18
+ deprecated: {
19
+ message: "Formatting rules are being moved out of ESLint core.",
20
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
21
+ deprecatedSince: "8.53.0",
22
+ availableUntil: "10.0.0",
23
+ replacedBy: [
24
+ {
25
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
26
+ url: "https://eslint.style/guide/migration",
27
+ plugin: {
28
+ name: "@stylistic/eslint-plugin-js",
29
+ url: "https://eslint.style/packages/js"
30
+ },
31
+ rule: {
32
+ name: "block-spacing",
33
+ url: "https://eslint.style/rules/js/block-spacing"
34
+ }
35
+ }
36
+ ]
37
+ },
20
38
  type: "layout",
21
39
 
22
40
  docs: {
@@ -15,8 +15,26 @@ const astUtils = require("./utils/ast-utils");
15
15
  /** @type {import('../shared/types').Rule} */
16
16
  module.exports = {
17
17
  meta: {
18
- deprecated: true,
19
- replacedBy: [],
18
+ deprecated: {
19
+ message: "Formatting rules are being moved out of ESLint core.",
20
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
21
+ deprecatedSince: "8.53.0",
22
+ availableUntil: "10.0.0",
23
+ replacedBy: [
24
+ {
25
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
26
+ url: "https://eslint.style/guide/migration",
27
+ plugin: {
28
+ name: "@stylistic/eslint-plugin-js",
29
+ url: "https://eslint.style/packages/js"
30
+ },
31
+ rule: {
32
+ name: "brace-style",
33
+ url: "https://eslint.style/rules/js/brace-style"
34
+ }
35
+ }
36
+ ]
37
+ },
20
38
  type: "layout",
21
39
 
22
40
  docs: {
@@ -12,9 +12,25 @@
12
12
  /** @type {import('../shared/types').Rule} */
13
13
  module.exports = {
14
14
  meta: {
15
- deprecated: true,
16
-
17
- replacedBy: [],
15
+ deprecated: {
16
+ message: "Node.js rules were moved out of ESLint core.",
17
+ url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
18
+ deprecatedSince: "7.0.0",
19
+ availableUntil: null,
20
+ replacedBy: [
21
+ {
22
+ message: "eslint-plugin-n now maintains deprecated Node.js-related rules.",
23
+ plugin: {
24
+ name: "eslint-plugin-n",
25
+ url: "https://github.com/eslint-community/eslint-plugin-n"
26
+ },
27
+ rule: {
28
+ name: "callback-return",
29
+ url: "https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/callback-return.md"
30
+ }
31
+ }
32
+ ]
33
+ },
18
34
 
19
35
  type: "suggestion",
20
36
 
@@ -74,8 +74,26 @@ function normalizeOptions(optionValue, ecmaVersion) {
74
74
  /** @type {import('../shared/types').Rule} */
75
75
  module.exports = {
76
76
  meta: {
77
- deprecated: true,
78
- replacedBy: [],
77
+ deprecated: {
78
+ message: "Formatting rules are being moved out of ESLint core.",
79
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
80
+ deprecatedSince: "8.53.0",
81
+ availableUntil: "10.0.0",
82
+ replacedBy: [
83
+ {
84
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
85
+ url: "https://eslint.style/guide/migration",
86
+ plugin: {
87
+ name: "@stylistic/eslint-plugin-js",
88
+ url: "https://eslint.style/packages/js"
89
+ },
90
+ rule: {
91
+ name: "comma-dangle",
92
+ url: "https://eslint.style/rules/js/comma-dangle"
93
+ }
94
+ }
95
+ ]
96
+ },
79
97
  type: "layout",
80
98
 
81
99
  docs: {
@@ -14,8 +14,26 @@ const astUtils = require("./utils/ast-utils");
14
14
  /** @type {import('../shared/types').Rule} */
15
15
  module.exports = {
16
16
  meta: {
17
- deprecated: true,
18
- replacedBy: [],
17
+ deprecated: {
18
+ message: "Formatting rules are being moved out of ESLint core.",
19
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
20
+ deprecatedSince: "8.53.0",
21
+ availableUntil: "10.0.0",
22
+ replacedBy: [
23
+ {
24
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
25
+ url: "https://eslint.style/guide/migration",
26
+ plugin: {
27
+ name: "@stylistic/eslint-plugin-js",
28
+ url: "https://eslint.style/packages/js"
29
+ },
30
+ rule: {
31
+ name: "comma-spacing",
32
+ url: "https://eslint.style/rules/js/comma-spacing"
33
+ }
34
+ }
35
+ ]
36
+ },
19
37
  type: "layout",
20
38
 
21
39
  docs: {
@@ -15,8 +15,26 @@ const astUtils = require("./utils/ast-utils");
15
15
  /** @type {import('../shared/types').Rule} */
16
16
  module.exports = {
17
17
  meta: {
18
- deprecated: true,
19
- replacedBy: [],
18
+ deprecated: {
19
+ message: "Formatting rules are being moved out of ESLint core.",
20
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
21
+ deprecatedSince: "8.53.0",
22
+ availableUntil: "10.0.0",
23
+ replacedBy: [
24
+ {
25
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
26
+ url: "https://eslint.style/guide/migration",
27
+ plugin: {
28
+ name: "@stylistic/eslint-plugin-js",
29
+ url: "https://eslint.style/packages/js"
30
+ },
31
+ rule: {
32
+ name: "comma-style",
33
+ url: "https://eslint.style/rules/js/comma-style"
34
+ }
35
+ }
36
+ ]
37
+ },
20
38
  type: "layout",
21
39
 
22
40
  docs: {
@@ -14,8 +14,26 @@ const astUtils = require("./utils/ast-utils");
14
14
  /** @type {import('../shared/types').Rule} */
15
15
  module.exports = {
16
16
  meta: {
17
- deprecated: true,
18
- replacedBy: [],
17
+ deprecated: {
18
+ message: "Formatting rules are being moved out of ESLint core.",
19
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
20
+ deprecatedSince: "8.53.0",
21
+ availableUntil: "10.0.0",
22
+ replacedBy: [
23
+ {
24
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
25
+ url: "https://eslint.style/guide/migration",
26
+ plugin: {
27
+ name: "@stylistic/eslint-plugin-js",
28
+ url: "https://eslint.style/packages/js"
29
+ },
30
+ rule: {
31
+ name: "computed-property-spacing",
32
+ url: "https://eslint.style/rules/js/computed-property-spacing"
33
+ }
34
+ }
35
+ ]
36
+ },
19
37
  type: "layout",
20
38
 
21
39
  docs: {
@@ -15,8 +15,26 @@ const astUtils = require("./utils/ast-utils");
15
15
  /** @type {import('../shared/types').Rule} */
16
16
  module.exports = {
17
17
  meta: {
18
- deprecated: true,
19
- replacedBy: [],
18
+ deprecated: {
19
+ message: "Formatting rules are being moved out of ESLint core.",
20
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
21
+ deprecatedSince: "8.53.0",
22
+ availableUntil: "10.0.0",
23
+ replacedBy: [
24
+ {
25
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
26
+ url: "https://eslint.style/guide/migration",
27
+ plugin: {
28
+ name: "@stylistic/eslint-plugin-js",
29
+ url: "https://eslint.style/packages/js"
30
+ },
31
+ rule: {
32
+ name: "dot-location",
33
+ url: "https://eslint.style/rules/js/dot-location"
34
+ }
35
+ }
36
+ ]
37
+ },
20
38
  type: "layout",
21
39
 
22
40
  docs: {