eslint 9.20.1 → 9.22.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 (117) hide show
  1. package/README.md +7 -5
  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/config-api.js +12 -0
  6. package/lib/eslint/eslint.js +7 -1
  7. package/lib/languages/js/source-code/source-code.js +18 -14
  8. package/lib/options.js +6 -0
  9. package/lib/rules/array-bracket-newline.js +20 -2
  10. package/lib/rules/array-bracket-spacing.js +20 -2
  11. package/lib/rules/array-element-newline.js +20 -2
  12. package/lib/rules/arrow-parens.js +20 -2
  13. package/lib/rules/arrow-spacing.js +20 -2
  14. package/lib/rules/block-spacing.js +20 -2
  15. package/lib/rules/brace-style.js +20 -2
  16. package/lib/rules/callback-return.js +19 -3
  17. package/lib/rules/comma-dangle.js +20 -2
  18. package/lib/rules/comma-spacing.js +20 -2
  19. package/lib/rules/comma-style.js +20 -2
  20. package/lib/rules/computed-property-spacing.js +20 -2
  21. package/lib/rules/dot-location.js +20 -2
  22. package/lib/rules/eol-last.js +20 -2
  23. package/lib/rules/func-call-spacing.js +20 -2
  24. package/lib/rules/function-call-argument-newline.js +20 -2
  25. package/lib/rules/function-paren-newline.js +20 -2
  26. package/lib/rules/generator-star-spacing.js +20 -2
  27. package/lib/rules/global-require.js +19 -3
  28. package/lib/rules/handle-callback-err.js +19 -3
  29. package/lib/rules/id-blacklist.js +14 -2
  30. package/lib/rules/implicit-arrow-linebreak.js +20 -2
  31. package/lib/rules/indent-legacy.js +19 -3
  32. package/lib/rules/indent.js +20 -2
  33. package/lib/rules/jsx-quotes.js +20 -2
  34. package/lib/rules/key-spacing.js +20 -2
  35. package/lib/rules/keyword-spacing.js +20 -2
  36. package/lib/rules/line-comment-position.js +20 -2
  37. package/lib/rules/linebreak-style.js +20 -2
  38. package/lib/rules/lines-around-comment.js +20 -2
  39. package/lib/rules/lines-around-directive.js +20 -2
  40. package/lib/rules/lines-between-class-members.js +20 -2
  41. package/lib/rules/max-len.js +20 -2
  42. package/lib/rules/max-statements-per-line.js +20 -2
  43. package/lib/rules/multiline-comment-style.js +20 -2
  44. package/lib/rules/multiline-ternary.js +20 -2
  45. package/lib/rules/new-parens.js +20 -2
  46. package/lib/rules/newline-after-var.js +20 -3
  47. package/lib/rules/newline-before-return.js +20 -2
  48. package/lib/rules/newline-per-chained-call.js +20 -2
  49. package/lib/rules/no-buffer-constructor.js +19 -3
  50. package/lib/rules/no-catch-shadow.js +14 -3
  51. package/lib/rules/no-confusing-arrow.js +20 -2
  52. package/lib/rules/no-console.js +19 -11
  53. package/lib/rules/no-extra-parens.js +20 -2
  54. package/lib/rules/no-extra-semi.js +20 -2
  55. package/lib/rules/no-floating-decimal.js +20 -2
  56. package/lib/rules/no-mixed-operators.js +20 -2
  57. package/lib/rules/no-mixed-requires.js +19 -3
  58. package/lib/rules/no-mixed-spaces-and-tabs.js +20 -2
  59. package/lib/rules/no-multi-spaces.js +20 -2
  60. package/lib/rules/no-multiple-empty-lines.js +20 -2
  61. package/lib/rules/no-native-reassign.js +14 -3
  62. package/lib/rules/no-negated-in-lhs.js +14 -3
  63. package/lib/rules/no-new-object.js +14 -5
  64. package/lib/rules/no-new-require.js +19 -3
  65. package/lib/rules/no-new-symbol.js +14 -5
  66. package/lib/rules/no-path-concat.js +19 -3
  67. package/lib/rules/no-process-env.js +19 -3
  68. package/lib/rules/no-process-exit.js +19 -3
  69. package/lib/rules/no-restricted-modules.js +19 -3
  70. package/lib/rules/no-return-await.js +7 -3
  71. package/lib/rules/no-spaced-func.js +20 -3
  72. package/lib/rules/no-sync.js +19 -3
  73. package/lib/rules/no-tabs.js +20 -2
  74. package/lib/rules/no-trailing-spaces.js +20 -2
  75. package/lib/rules/no-whitespace-before-property.js +20 -2
  76. package/lib/rules/nonblock-statement-body-position.js +20 -2
  77. package/lib/rules/object-curly-newline.js +20 -2
  78. package/lib/rules/object-curly-spacing.js +20 -2
  79. package/lib/rules/object-property-newline.js +20 -2
  80. package/lib/rules/one-var-declaration-per-line.js +20 -2
  81. package/lib/rules/operator-linebreak.js +20 -2
  82. package/lib/rules/padded-blocks.js +20 -2
  83. package/lib/rules/padding-line-between-statements.js +20 -2
  84. package/lib/rules/prefer-reflect.js +7 -3
  85. package/lib/rules/quote-props.js +20 -2
  86. package/lib/rules/quotes.js +20 -2
  87. package/lib/rules/rest-spread-spacing.js +20 -2
  88. package/lib/rules/semi-spacing.js +20 -2
  89. package/lib/rules/semi-style.js +20 -2
  90. package/lib/rules/semi.js +20 -2
  91. package/lib/rules/space-before-blocks.js +20 -2
  92. package/lib/rules/space-before-function-paren.js +20 -2
  93. package/lib/rules/space-in-parens.js +20 -2
  94. package/lib/rules/space-infix-ops.js +20 -2
  95. package/lib/rules/space-unary-ops.js +20 -2
  96. package/lib/rules/spaced-comment.js +20 -2
  97. package/lib/rules/switch-colon-spacing.js +20 -2
  98. package/lib/rules/template-curly-spacing.js +20 -2
  99. package/lib/rules/template-tag-spacing.js +20 -2
  100. package/lib/rules/wrap-iife.js +20 -2
  101. package/lib/rules/wrap-regex.js +20 -2
  102. package/lib/rules/yield-star-spacing.js +20 -2
  103. package/lib/shared/types.js +19 -1
  104. package/lib/types/config-api.d.ts +8 -0
  105. package/lib/types/index.d.ts +8 -4
  106. package/lib/types/rules.d.ts +5199 -0
  107. package/messages/config-plugin-missing.js +14 -0
  108. package/package.json +19 -11
  109. package/lib/types/rules/best-practices.d.ts +0 -1143
  110. package/lib/types/rules/deprecated.d.ts +0 -252
  111. package/lib/types/rules/ecmascript-6.d.ts +0 -647
  112. package/lib/types/rules/index.d.ts +0 -50
  113. package/lib/types/rules/node-commonjs.d.ts +0 -171
  114. package/lib/types/rules/possible-errors.d.ts +0 -685
  115. package/lib/types/rules/strict-mode.d.ts +0 -38
  116. package/lib/types/rules/stylistic-issues.d.ts +0 -2043
  117. package/lib/types/rules/variables.d.ts +0 -234
@@ -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: "max-statements-per-line",
36
+ url: "https://eslint.style/rules/js/max-statements-per-line"
37
+ }
38
+ }
39
+ ]
40
+ },
23
41
  type: "layout",
24
42
 
25
43
  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: "9.3.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: "multiline-comment-style",
32
+ url: "https://eslint.style/rules/js/multiline-comment-style"
33
+ }
34
+ }
35
+ ]
36
+ },
19
37
  type: "suggestion",
20
38
  docs: {
21
39
  description: "Enforce a particular style for multiline comments",
@@ -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: "multiline-ternary",
33
+ url: "https://eslint.style/rules/js/multiline-ternary"
34
+ }
35
+ }
36
+ ]
37
+ },
20
38
  type: "layout",
21
39
 
22
40
  docs: {
@@ -23,8 +23,26 @@ const astUtils = require("./utils/ast-utils");
23
23
  /** @type {import('../shared/types').Rule} */
24
24
  module.exports = {
25
25
  meta: {
26
- deprecated: true,
27
- replacedBy: [],
26
+ deprecated: {
27
+ message: "Formatting rules are being moved out of ESLint core.",
28
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
29
+ deprecatedSince: "8.53.0",
30
+ availableUntil: "10.0.0",
31
+ replacedBy: [
32
+ {
33
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
34
+ url: "https://eslint.style/guide/migration",
35
+ plugin: {
36
+ name: "@stylistic/eslint-plugin-js",
37
+ url: "https://eslint.style/packages/js"
38
+ },
39
+ rule: {
40
+ name: "new-parens",
41
+ url: "https://eslint.style/rules/js/new-parens"
42
+ }
43
+ }
44
+ ]
45
+ },
28
46
  type: "layout",
29
47
 
30
48
  docs: {
@@ -37,9 +37,26 @@ module.exports = {
37
37
  unexpected: "Unexpected blank line after variable declarations."
38
38
  },
39
39
 
40
- deprecated: true,
41
-
42
- replacedBy: ["padding-line-between-statements"]
40
+ deprecated: {
41
+ message: "The rule was replaced with a more general rule.",
42
+ url: "https://eslint.org/blog/2017/06/eslint-v4.0.0-released/",
43
+ deprecatedSince: "4.0.0",
44
+ availableUntil: null,
45
+ replacedBy: [
46
+ {
47
+ message: "The new rule moved to a plugin.",
48
+ url: "https://eslint.org/docs/latest/rules/padding-line-between-statements#examples",
49
+ plugin: {
50
+ name: "@stylistic/eslint-plugin-js",
51
+ url: "https://eslint.style/packages/js"
52
+ },
53
+ rule: {
54
+ name: "padding-line-between-statements",
55
+ url: "https://eslint.style/rules/js/padding-line-between-statements"
56
+ }
57
+ }
58
+ ]
59
+ }
43
60
  },
44
61
 
45
62
  create(context) {
@@ -26,8 +26,26 @@ module.exports = {
26
26
  expected: "Expected newline before return statement."
27
27
  },
28
28
 
29
- deprecated: true,
30
- replacedBy: ["padding-line-between-statements"]
29
+ deprecated: {
30
+ message: "The rule was replaced with a more general rule.",
31
+ url: "https://eslint.org/blog/2017/06/eslint-v4.0.0-released/",
32
+ deprecatedSince: "4.0.0",
33
+ availableUntil: null,
34
+ replacedBy: [
35
+ {
36
+ message: "The new rule moved to a plugin.",
37
+ url: "https://eslint.org/docs/latest/rules/padding-line-between-statements#examples",
38
+ plugin: {
39
+ name: "@stylistic/eslint-plugin-js",
40
+ url: "https://eslint.style/packages/js"
41
+ },
42
+ rule: {
43
+ name: "padding-line-between-statements",
44
+ url: "https://eslint.style/rules/js/padding-line-between-statements"
45
+ }
46
+ }
47
+ ]
48
+ }
31
49
  },
32
50
 
33
51
  create(context) {
@@ -16,8 +16,26 @@ const astUtils = require("./utils/ast-utils");
16
16
  /** @type {import('../shared/types').Rule} */
17
17
  module.exports = {
18
18
  meta: {
19
- deprecated: true,
20
- replacedBy: [],
19
+ deprecated: {
20
+ message: "Formatting rules are being moved out of ESLint core.",
21
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
22
+ deprecatedSince: "8.53.0",
23
+ availableUntil: "10.0.0",
24
+ replacedBy: [
25
+ {
26
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
27
+ url: "https://eslint.style/guide/migration",
28
+ plugin: {
29
+ name: "@stylistic/eslint-plugin-js",
30
+ url: "https://eslint.style/packages/js"
31
+ },
32
+ rule: {
33
+ name: "newline-per-chained-call",
34
+ url: "https://eslint.style/rules/js/newline-per-chained-call"
35
+ }
36
+ }
37
+ ]
38
+ },
21
39
  type: "layout",
22
40
 
23
41
  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: "no-deprecated-api",
29
+ url: "https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-deprecated-api.md"
30
+ }
31
+ }
32
+ ]
33
+ },
18
34
 
19
35
  type: "problem",
20
36
 
@@ -27,9 +27,20 @@ module.exports = {
27
27
  url: "https://eslint.org/docs/latest/rules/no-catch-shadow"
28
28
  },
29
29
 
30
- replacedBy: ["no-shadow"],
31
-
32
- deprecated: true,
30
+ deprecated: {
31
+ message: "This rule was renamed.",
32
+ url: "https://eslint.org/blog/2018/07/eslint-v5.1.0-released/",
33
+ deprecatedSince: "5.1.0",
34
+ availableUntil: null,
35
+ replacedBy: [
36
+ {
37
+ rule: {
38
+ name: "no-shadow",
39
+ url: "https://eslint.org/docs/rules/no-shadow"
40
+ }
41
+ }
42
+ ]
43
+ },
33
44
  schema: [],
34
45
 
35
46
  messages: {
@@ -29,8 +29,26 @@ function isConditional(node) {
29
29
  /** @type {import('../shared/types').Rule} */
30
30
  module.exports = {
31
31
  meta: {
32
- deprecated: true,
33
- replacedBy: [],
32
+ deprecated: {
33
+ message: "Formatting rules are being moved out of ESLint core.",
34
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
35
+ deprecatedSince: "8.53.0",
36
+ availableUntil: "10.0.0",
37
+ replacedBy: [
38
+ {
39
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
40
+ url: "https://eslint.style/guide/migration",
41
+ plugin: {
42
+ name: "@stylistic/eslint-plugin-js",
43
+ url: "https://eslint.style/packages/js"
44
+ },
45
+ rule: {
46
+ name: "no-confusing-arrow",
47
+ url: "https://eslint.style/rules/js/no-confusing-arrow"
48
+ }
49
+ }
50
+ ]
51
+ },
34
52
  type: "suggestion",
35
53
 
36
54
  docs: {
@@ -50,7 +50,8 @@ module.exports = {
50
50
  messages: {
51
51
  unexpected: "Unexpected console statement.",
52
52
  limited: "Unexpected console statement. Only these console methods are allowed: {{ allowed }}.",
53
- removeConsole: "Remove the console.{{ propertyName }}()."
53
+ removeConsole: "Remove the console.{{ propertyName }}().",
54
+ removeMethodCall: "Remove the console method call."
54
55
  }
55
56
  },
56
57
 
@@ -165,22 +166,29 @@ module.exports = {
165
166
  function report(reference) {
166
167
  const node = reference.identifier.parent;
167
168
 
168
- const propertyName = astUtils.getStaticPropertyName(node);
169
+ const suggest = [];
170
+
171
+ if (canProvideSuggestions(node)) {
172
+ const suggestion = {
173
+ fix(fixer) {
174
+ return fixer.remove(node.parent.parent);
175
+ }
176
+ };
169
177
 
178
+ if (node.computed) {
179
+ suggestion.messageId = "removeMethodCall";
180
+ } else {
181
+ suggestion.messageId = "removeConsole";
182
+ suggestion.data = { propertyName: node.property.name };
183
+ }
184
+ suggest.push(suggestion);
185
+ }
170
186
  context.report({
171
187
  node,
172
188
  loc: node.loc,
173
189
  messageId: allowed.length ? "limited" : "unexpected",
174
190
  data: { allowed: allowed.join(", ") },
175
- suggest: canProvideSuggestions(node)
176
- ? [{
177
- messageId: "removeConsole",
178
- data: { propertyName },
179
- fix(fixer) {
180
- return fixer.remove(node.parent.parent);
181
- }
182
- }]
183
- : []
191
+ suggest
184
192
  });
185
193
  }
186
194
 
@@ -15,8 +15,26 @@ const astUtils = require("./utils/ast-utils.js");
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: "no-extra-parens",
33
+ url: "https://eslint.style/rules/js/no-extra-parens"
34
+ }
35
+ }
36
+ ]
37
+ },
20
38
  type: "layout",
21
39
 
22
40
  docs: {
@@ -20,8 +20,26 @@ const astUtils = require("./utils/ast-utils");
20
20
  /** @type {import('../shared/types').Rule} */
21
21
  module.exports = {
22
22
  meta: {
23
- deprecated: true,
24
- replacedBy: [],
23
+ deprecated: {
24
+ message: "Formatting rules are being moved out of ESLint core.",
25
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
26
+ deprecatedSince: "8.53.0",
27
+ availableUntil: "10.0.0",
28
+ replacedBy: [
29
+ {
30
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
31
+ url: "https://eslint.style/guide/migration",
32
+ plugin: {
33
+ name: "@stylistic/eslint-plugin-js",
34
+ url: "https://eslint.style/packages/js"
35
+ },
36
+ rule: {
37
+ name: "no-extra-semi",
38
+ url: "https://eslint.style/rules/js/no-extra-semi"
39
+ }
40
+ }
41
+ ]
42
+ },
25
43
  type: "suggestion",
26
44
 
27
45
  docs: {
@@ -19,8 +19,26 @@ const astUtils = require("./utils/ast-utils");
19
19
  /** @type {import('../shared/types').Rule} */
20
20
  module.exports = {
21
21
  meta: {
22
- deprecated: true,
23
- replacedBy: [],
22
+ deprecated: {
23
+ message: "Formatting rules are being moved out of ESLint core.",
24
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
25
+ deprecatedSince: "8.53.0",
26
+ availableUntil: "10.0.0",
27
+ replacedBy: [
28
+ {
29
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
30
+ url: "https://eslint.style/guide/migration",
31
+ plugin: {
32
+ name: "@stylistic/eslint-plugin-js",
33
+ url: "https://eslint.style/packages/js"
34
+ },
35
+ rule: {
36
+ name: "no-floating-decimal",
37
+ url: "https://eslint.style/rules/js/no-floating-decimal"
38
+ }
39
+ }
40
+ ]
41
+ },
24
42
  type: "suggestion",
25
43
 
26
44
  docs: {
@@ -86,8 +86,26 @@ function getChildNode(node) {
86
86
  /** @type {import('../shared/types').Rule} */
87
87
  module.exports = {
88
88
  meta: {
89
- deprecated: true,
90
- replacedBy: [],
89
+ deprecated: {
90
+ message: "Formatting rules are being moved out of ESLint core.",
91
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
92
+ deprecatedSince: "8.53.0",
93
+ availableUntil: "10.0.0",
94
+ replacedBy: [
95
+ {
96
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
97
+ url: "https://eslint.style/guide/migration",
98
+ plugin: {
99
+ name: "@stylistic/eslint-plugin-js",
100
+ url: "https://eslint.style/packages/js"
101
+ },
102
+ rule: {
103
+ name: "no-mixed-operators",
104
+ url: "https://eslint.style/rules/js/no-mixed-operators"
105
+ }
106
+ }
107
+ ]
108
+ },
91
109
  type: "suggestion",
92
110
 
93
111
  docs: {
@@ -13,9 +13,25 @@
13
13
  /** @type {import('../shared/types').Rule} */
14
14
  module.exports = {
15
15
  meta: {
16
- deprecated: true,
17
-
18
- replacedBy: [],
16
+ deprecated: {
17
+ message: "Node.js rules were moved out of ESLint core.",
18
+ url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
19
+ deprecatedSince: "7.0.0",
20
+ availableUntil: null,
21
+ replacedBy: [
22
+ {
23
+ message: "eslint-plugin-n now maintains deprecated Node.js-related rules.",
24
+ plugin: {
25
+ name: "eslint-plugin-n",
26
+ url: "https://github.com/eslint-community/eslint-plugin-n"
27
+ },
28
+ rule: {
29
+ name: "no-mixed-requires",
30
+ url: "https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-mixed-requires.md"
31
+ }
32
+ }
33
+ ]
34
+ },
19
35
 
20
36
  type: "suggestion",
21
37
 
@@ -12,8 +12,26 @@
12
12
  /** @type {import('../shared/types').Rule} */
13
13
  module.exports = {
14
14
  meta: {
15
- deprecated: true,
16
- replacedBy: [],
15
+ deprecated: {
16
+ message: "Formatting rules are being moved out of ESLint core.",
17
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
18
+ deprecatedSince: "8.53.0",
19
+ availableUntil: "10.0.0",
20
+ replacedBy: [
21
+ {
22
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
23
+ url: "https://eslint.style/guide/migration",
24
+ plugin: {
25
+ name: "@stylistic/eslint-plugin-js",
26
+ url: "https://eslint.style/packages/js"
27
+ },
28
+ rule: {
29
+ name: "no-mixed-spaces-and-tabs",
30
+ url: "https://eslint.style/rules/js/no-mixed-spaces-and-tabs"
31
+ }
32
+ }
33
+ ]
34
+ },
17
35
  type: "layout",
18
36
 
19
37
  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: "no-multi-spaces",
33
+ url: "https://eslint.style/rules/js/no-multi-spaces"
34
+ }
35
+ }
36
+ ]
37
+ },
20
38
  type: "layout",
21
39
 
22
40
  docs: {
@@ -13,8 +13,26 @@
13
13
  /** @type {import('../shared/types').Rule} */
14
14
  module.exports = {
15
15
  meta: {
16
- deprecated: true,
17
- replacedBy: [],
16
+ deprecated: {
17
+ message: "Formatting rules are being moved out of ESLint core.",
18
+ url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
19
+ deprecatedSince: "8.53.0",
20
+ availableUntil: "10.0.0",
21
+ replacedBy: [
22
+ {
23
+ message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
24
+ url: "https://eslint.style/guide/migration",
25
+ plugin: {
26
+ name: "@stylistic/eslint-plugin-js",
27
+ url: "https://eslint.style/packages/js"
28
+ },
29
+ rule: {
30
+ name: "no-multiple-empty-lines",
31
+ url: "https://eslint.style/rules/js/no-multiple-empty-lines"
32
+ }
33
+ }
34
+ ]
35
+ },
18
36
  type: "layout",
19
37
 
20
38
  docs: {
@@ -21,9 +21,20 @@ module.exports = {
21
21
  url: "https://eslint.org/docs/latest/rules/no-native-reassign"
22
22
  },
23
23
 
24
- deprecated: true,
25
-
26
- replacedBy: ["no-global-assign"],
24
+ deprecated: {
25
+ message: "Renamed rule.",
26
+ url: "https://eslint.org/blog/2016/08/eslint-v3.3.0-released/#deprecated-rules",
27
+ deprecatedSince: "3.3.0",
28
+ availableUntil: null,
29
+ replacedBy: [
30
+ {
31
+ rule: {
32
+ name: "no-global-assign",
33
+ url: "https://eslint.org/docs/rules/no-global-assign"
34
+ }
35
+ }
36
+ ]
37
+ },
27
38
 
28
39
  schema: [
29
40
  {
@@ -21,9 +21,20 @@ module.exports = {
21
21
  url: "https://eslint.org/docs/latest/rules/no-negated-in-lhs"
22
22
  },
23
23
 
24
- replacedBy: ["no-unsafe-negation"],
25
-
26
- deprecated: true,
24
+ deprecated: {
25
+ message: "Renamed rule.",
26
+ url: "https://eslint.org/blog/2016/08/eslint-v3.3.0-released/#deprecated-rules",
27
+ deprecatedSince: "3.3.0",
28
+ availableUntil: null,
29
+ replacedBy: [
30
+ {
31
+ rule: {
32
+ name: "no-unsafe-negation",
33
+ url: "https://eslint.org/docs/rules/no-unsafe-negation"
34
+ }
35
+ }
36
+ ]
37
+ },
27
38
  schema: [],
28
39
 
29
40
  messages: {
@@ -27,11 +27,20 @@ module.exports = {
27
27
  url: "https://eslint.org/docs/latest/rules/no-new-object"
28
28
  },
29
29
 
30
- deprecated: true,
31
-
32
- replacedBy: [
33
- "no-object-constructor"
34
- ],
30
+ deprecated: {
31
+ message: "The new rule flags more situations where object literal syntax can be used, and it does not report a problem when the `Object` constructor is invoked with an argument.",
32
+ url: "https://eslint.org/blog/2023/09/eslint-v8.50.0-released/",
33
+ deprecatedSince: "8.50.0",
34
+ availableUntil: null,
35
+ replacedBy: [
36
+ {
37
+ rule: {
38
+ name: "no-object-constructor",
39
+ url: "https://eslint.org/docs/rules/no-object-constructor"
40
+ }
41
+ }
42
+ ]
43
+ },
35
44
 
36
45
  schema: [],
37
46