eslint 9.36.0 → 9.38.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 (106) hide show
  1. package/README.md +11 -1
  2. package/lib/cli-engine/lint-result-cache.js +47 -29
  3. package/lib/eslint/eslint-helpers.js +7 -4
  4. package/lib/eslint/eslint.js +151 -37
  5. package/lib/eslint/worker.js +1 -3
  6. package/lib/linter/esquery.js +1 -1
  7. package/lib/rules/array-bracket-newline.js +1 -1
  8. package/lib/rules/array-bracket-spacing.js +1 -1
  9. package/lib/rules/array-element-newline.js +1 -1
  10. package/lib/rules/arrow-parens.js +1 -1
  11. package/lib/rules/arrow-spacing.js +1 -1
  12. package/lib/rules/block-spacing.js +1 -1
  13. package/lib/rules/brace-style.js +1 -1
  14. package/lib/rules/callback-return.js +1 -1
  15. package/lib/rules/comma-dangle.js +1 -1
  16. package/lib/rules/comma-spacing.js +1 -1
  17. package/lib/rules/comma-style.js +1 -1
  18. package/lib/rules/complexity.js +6 -0
  19. package/lib/rules/computed-property-spacing.js +1 -1
  20. package/lib/rules/dot-location.js +1 -1
  21. package/lib/rules/eol-last.js +1 -1
  22. package/lib/rules/func-call-spacing.js +2 -2
  23. package/lib/rules/function-call-argument-newline.js +1 -1
  24. package/lib/rules/function-paren-newline.js +1 -1
  25. package/lib/rules/generator-star-spacing.js +1 -1
  26. package/lib/rules/global-require.js +1 -1
  27. package/lib/rules/handle-callback-err.js +1 -1
  28. package/lib/rules/id-blacklist.js +1 -1
  29. package/lib/rules/implicit-arrow-linebreak.js +1 -1
  30. package/lib/rules/indent-legacy.js +1 -0
  31. package/lib/rules/indent.js +1 -1
  32. package/lib/rules/jsx-quotes.js +1 -1
  33. package/lib/rules/key-spacing.js +1 -1
  34. package/lib/rules/keyword-spacing.js +1 -1
  35. package/lib/rules/line-comment-position.js +1 -1
  36. package/lib/rules/linebreak-style.js +1 -1
  37. package/lib/rules/lines-around-comment.js +1 -1
  38. package/lib/rules/lines-around-directive.js +1 -1
  39. package/lib/rules/lines-between-class-members.js +1 -1
  40. package/lib/rules/max-len.js +1 -1
  41. package/lib/rules/max-statements-per-line.js +1 -1
  42. package/lib/rules/multiline-comment-style.js +1 -1
  43. package/lib/rules/multiline-ternary.js +1 -1
  44. package/lib/rules/new-parens.js +1 -1
  45. package/lib/rules/newline-after-var.js +1 -1
  46. package/lib/rules/newline-before-return.js +1 -1
  47. package/lib/rules/newline-per-chained-call.js +1 -1
  48. package/lib/rules/no-buffer-constructor.js +1 -1
  49. package/lib/rules/no-catch-shadow.js +1 -1
  50. package/lib/rules/no-confusing-arrow.js +1 -1
  51. package/lib/rules/no-extra-parens.js +1 -1
  52. package/lib/rules/no-extra-semi.js +1 -1
  53. package/lib/rules/no-floating-decimal.js +1 -1
  54. package/lib/rules/no-loss-of-precision.js +206 -211
  55. package/lib/rules/no-mixed-operators.js +1 -1
  56. package/lib/rules/no-mixed-requires.js +1 -1
  57. package/lib/rules/no-mixed-spaces-and-tabs.js +1 -1
  58. package/lib/rules/no-multi-spaces.js +1 -1
  59. package/lib/rules/no-multiple-empty-lines.js +1 -1
  60. package/lib/rules/no-native-reassign.js +1 -1
  61. package/lib/rules/no-negated-in-lhs.js +1 -1
  62. package/lib/rules/no-new-object.js +1 -1
  63. package/lib/rules/no-new-require.js +1 -1
  64. package/lib/rules/no-new-symbol.js +1 -1
  65. package/lib/rules/no-path-concat.js +1 -1
  66. package/lib/rules/no-process-env.js +1 -1
  67. package/lib/rules/no-process-exit.js +1 -1
  68. package/lib/rules/no-restricted-imports.js +171 -4
  69. package/lib/rules/no-restricted-modules.js +1 -1
  70. package/lib/rules/no-spaced-func.js +1 -1
  71. package/lib/rules/no-sync.js +1 -1
  72. package/lib/rules/no-tabs.js +1 -1
  73. package/lib/rules/no-trailing-spaces.js +1 -1
  74. package/lib/rules/no-whitespace-before-property.js +1 -1
  75. package/lib/rules/nonblock-statement-body-position.js +1 -1
  76. package/lib/rules/object-curly-newline.js +1 -1
  77. package/lib/rules/object-curly-spacing.js +1 -1
  78. package/lib/rules/object-property-newline.js +1 -1
  79. package/lib/rules/one-var-declaration-per-line.js +1 -1
  80. package/lib/rules/operator-linebreak.js +1 -1
  81. package/lib/rules/padded-blocks.js +1 -1
  82. package/lib/rules/padding-line-between-statements.js +1 -1
  83. package/lib/rules/preserve-caught-error.js +1 -5
  84. package/lib/rules/quote-props.js +1 -1
  85. package/lib/rules/quotes.js +1 -1
  86. package/lib/rules/rest-spread-spacing.js +1 -1
  87. package/lib/rules/semi-spacing.js +1 -1
  88. package/lib/rules/semi-style.js +1 -1
  89. package/lib/rules/semi.js +1 -1
  90. package/lib/rules/space-before-blocks.js +1 -1
  91. package/lib/rules/space-before-function-paren.js +1 -1
  92. package/lib/rules/space-in-parens.js +1 -1
  93. package/lib/rules/space-infix-ops.js +1 -1
  94. package/lib/rules/space-unary-ops.js +1 -1
  95. package/lib/rules/spaced-comment.js +1 -1
  96. package/lib/rules/switch-colon-spacing.js +1 -1
  97. package/lib/rules/template-curly-spacing.js +1 -1
  98. package/lib/rules/template-tag-spacing.js +1 -1
  99. package/lib/rules/wrap-iife.js +1 -1
  100. package/lib/rules/wrap-regex.js +1 -1
  101. package/lib/rules/yield-star-spacing.js +1 -1
  102. package/lib/shared/serialization.js +1 -1
  103. package/lib/types/config-api.d.ts +6 -2
  104. package/lib/types/index.d.ts +92 -407
  105. package/lib/types/rules.d.ts +2 -0
  106. package/package.json +9 -9
@@ -23,7 +23,7 @@ module.exports = {
23
23
  message: "Formatting rules are being moved out of ESLint core.",
24
24
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
25
25
  deprecatedSince: "8.53.0",
26
- availableUntil: "10.0.0",
26
+ availableUntil: "11.0.0",
27
27
  replacedBy: [
28
28
  {
29
29
  message:
@@ -105,7 +105,7 @@ module.exports = {
105
105
  * Check if open space is present in a function name
106
106
  * @param {ASTNode} node node to evaluate
107
107
  * @param {Token} leftToken The last token of the callee. This may be the closing parenthesis that encloses the callee.
108
- * @param {Token} rightToken Tha first token of the arguments. this is the opening parenthesis that encloses the arguments.
108
+ * @param {Token} rightToken The first token of the arguments. this is the opening parenthesis that encloses the arguments.
109
109
  * @returns {void}
110
110
  * @private
111
111
  */
@@ -17,7 +17,7 @@ module.exports = {
17
17
  message: "Formatting rules are being moved out of ESLint core.",
18
18
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
19
19
  deprecatedSince: "8.53.0",
20
- availableUntil: "10.0.0",
20
+ availableUntil: "11.0.0",
21
21
  replacedBy: [
22
22
  {
23
23
  message:
@@ -22,7 +22,7 @@ module.exports = {
22
22
  message: "Formatting rules are being moved out of ESLint core.",
23
23
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
24
24
  deprecatedSince: "8.53.0",
25
- availableUntil: "10.0.0",
25
+ availableUntil: "11.0.0",
26
26
  replacedBy: [
27
27
  {
28
28
  message:
@@ -33,7 +33,7 @@ module.exports = {
33
33
  message: "Formatting rules are being moved out of ESLint core.",
34
34
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
35
35
  deprecatedSince: "8.53.0",
36
- availableUntil: "10.0.0",
36
+ availableUntil: "11.0.0",
37
37
  replacedBy: [
38
38
  {
39
39
  message:
@@ -60,7 +60,7 @@ module.exports = {
60
60
  message: "Node.js rules were moved out of ESLint core.",
61
61
  url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
62
62
  deprecatedSince: "7.0.0",
63
- availableUntil: null,
63
+ availableUntil: "11.0.0",
64
64
  replacedBy: [
65
65
  {
66
66
  message:
@@ -17,7 +17,7 @@ module.exports = {
17
17
  message: "Node.js rules were moved out of ESLint core.",
18
18
  url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
19
19
  deprecatedSince: "7.0.0",
20
- availableUntil: null,
20
+ availableUntil: "11.0.0",
21
21
  replacedBy: [
22
22
  {
23
23
  message:
@@ -101,7 +101,7 @@ module.exports = {
101
101
  message: "The rule was renamed.",
102
102
  url: "https://eslint.org/blog/2020/07/eslint-v7.5.0-released/#deprecating-id-blacklist",
103
103
  deprecatedSince: "7.5.0",
104
- availableUntil: null,
104
+ availableUntil: "11.0.0",
105
105
  replacedBy: [
106
106
  {
107
107
  rule: {
@@ -17,7 +17,7 @@ module.exports = {
17
17
  message: "Formatting rules are being moved out of ESLint core.",
18
18
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
19
19
  deprecatedSince: "8.53.0",
20
- availableUntil: "10.0.0",
20
+ availableUntil: "11.0.0",
21
21
  replacedBy: [
22
22
  {
23
23
  message:
@@ -35,6 +35,7 @@ module.exports = {
35
35
  message: "Formatting rules are being moved out of ESLint core.",
36
36
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
37
37
  deprecatedSince: "4.0.0",
38
+ availableUntil: "11.0.0",
38
39
  replacedBy: [
39
40
  {
40
41
  message:
@@ -512,7 +512,7 @@ module.exports = {
512
512
  message: "Formatting rules are being moved out of ESLint core.",
513
513
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
514
514
  deprecatedSince: "8.53.0",
515
- availableUntil: "10.0.0",
515
+ availableUntil: "11.0.0",
516
516
  replacedBy: [
517
517
  {
518
518
  message:
@@ -44,7 +44,7 @@ module.exports = {
44
44
  message: "Formatting rules are being moved out of ESLint core.",
45
45
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
46
46
  deprecatedSince: "8.53.0",
47
- availableUntil: "10.0.0",
47
+ availableUntil: "11.0.0",
48
48
  replacedBy: [
49
49
  {
50
50
  message:
@@ -151,7 +151,7 @@ module.exports = {
151
151
  message: "Formatting rules are being moved out of ESLint core.",
152
152
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
153
153
  deprecatedSince: "8.53.0",
154
- availableUntil: "10.0.0",
154
+ availableUntil: "11.0.0",
155
155
  replacedBy: [
156
156
  {
157
157
  message:
@@ -82,7 +82,7 @@ module.exports = {
82
82
  message: "Formatting rules are being moved out of ESLint core.",
83
83
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
84
84
  deprecatedSince: "8.53.0",
85
- availableUntil: "10.0.0",
85
+ availableUntil: "11.0.0",
86
86
  replacedBy: [
87
87
  {
88
88
  message:
@@ -18,7 +18,7 @@ module.exports = {
18
18
  message: "Formatting rules are being moved out of ESLint core.",
19
19
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
20
20
  deprecatedSince: "9.3.0",
21
- availableUntil: "10.0.0",
21
+ availableUntil: "11.0.0",
22
22
  replacedBy: [
23
23
  {
24
24
  message:
@@ -31,7 +31,7 @@ module.exports = {
31
31
  message: "Formatting rules are being moved out of ESLint core.",
32
32
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
33
33
  deprecatedSince: "8.53.0",
34
- availableUntil: "10.0.0",
34
+ availableUntil: "11.0.0",
35
35
  replacedBy: [
36
36
  {
37
37
  message:
@@ -60,7 +60,7 @@ module.exports = {
60
60
  message: "Formatting rules are being moved out of ESLint core.",
61
61
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
62
62
  deprecatedSince: "8.53.0",
63
- availableUntil: "10.0.0",
63
+ availableUntil: "11.0.0",
64
64
  replacedBy: [
65
65
  {
66
66
  message:
@@ -56,7 +56,7 @@ module.exports = {
56
56
  message: "The rule was replaced with a more general rule.",
57
57
  url: "https://eslint.org/blog/2017/06/eslint-v4.0.0-released/",
58
58
  deprecatedSince: "4.0.0",
59
- availableUntil: null,
59
+ availableUntil: "11.0.0",
60
60
  replacedBy: [
61
61
  {
62
62
  message: "The new rule moved to a plugin.",
@@ -37,7 +37,7 @@ module.exports = {
37
37
  message: "Formatting rules are being moved out of ESLint core.",
38
38
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
39
39
  deprecatedSince: "8.53.0",
40
- availableUntil: "10.0.0",
40
+ availableUntil: "11.0.0",
41
41
  replacedBy: [
42
42
  {
43
43
  message:
@@ -71,7 +71,7 @@ module.exports = {
71
71
  message: "Formatting rules are being moved out of ESLint core.",
72
72
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
73
73
  deprecatedSince: "8.53.0",
74
- availableUntil: "10.0.0",
74
+ availableUntil: "11.0.0",
75
75
  replacedBy: [
76
76
  {
77
77
  message:
@@ -22,7 +22,7 @@ module.exports = {
22
22
  message: "Formatting rules are being moved out of ESLint core.",
23
23
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
24
24
  deprecatedSince: "8.53.0",
25
- availableUntil: "10.0.0",
25
+ availableUntil: "11.0.0",
26
26
  replacedBy: [
27
27
  {
28
28
  message:
@@ -18,7 +18,7 @@ module.exports = {
18
18
  message: "Formatting rules are being moved out of ESLint core.",
19
19
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
20
20
  deprecatedSince: "9.3.0",
21
- availableUntil: "10.0.0",
21
+ availableUntil: "11.0.0",
22
22
  replacedBy: [
23
23
  {
24
24
  message:
@@ -19,7 +19,7 @@ module.exports = {
19
19
  message: "Formatting rules are being moved out of ESLint core.",
20
20
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
21
21
  deprecatedSince: "8.53.0",
22
- availableUntil: "10.0.0",
22
+ availableUntil: "11.0.0",
23
23
  replacedBy: [
24
24
  {
25
25
  message:
@@ -27,7 +27,7 @@ module.exports = {
27
27
  message: "Formatting rules are being moved out of ESLint core.",
28
28
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
29
29
  deprecatedSince: "8.53.0",
30
- availableUntil: "10.0.0",
30
+ availableUntil: "11.0.0",
31
31
  replacedBy: [
32
32
  {
33
33
  message:
@@ -42,7 +42,7 @@ module.exports = {
42
42
  message: "The rule was replaced with a more general rule.",
43
43
  url: "https://eslint.org/blog/2017/06/eslint-v4.0.0-released/",
44
44
  deprecatedSince: "4.0.0",
45
- availableUntil: null,
45
+ availableUntil: "11.0.0",
46
46
  replacedBy: [
47
47
  {
48
48
  message: "The new rule moved to a plugin.",
@@ -30,7 +30,7 @@ module.exports = {
30
30
  message: "The rule was replaced with a more general rule.",
31
31
  url: "https://eslint.org/blog/2017/06/eslint-v4.0.0-released/",
32
32
  deprecatedSince: "4.0.0",
33
- availableUntil: null,
33
+ availableUntil: "11.0.0",
34
34
  replacedBy: [
35
35
  {
36
36
  message: "The new rule moved to a plugin.",
@@ -20,7 +20,7 @@ module.exports = {
20
20
  message: "Formatting rules are being moved out of ESLint core.",
21
21
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
22
22
  deprecatedSince: "8.53.0",
23
- availableUntil: "10.0.0",
23
+ availableUntil: "11.0.0",
24
24
  replacedBy: [
25
25
  {
26
26
  message:
@@ -16,7 +16,7 @@ module.exports = {
16
16
  message: "Node.js rules were moved out of ESLint core.",
17
17
  url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
18
18
  deprecatedSince: "7.0.0",
19
- availableUntil: null,
19
+ availableUntil: "11.0.0",
20
20
  replacedBy: [
21
21
  {
22
22
  message:
@@ -32,7 +32,7 @@ module.exports = {
32
32
  message: "This rule was renamed.",
33
33
  url: "https://eslint.org/blog/2018/07/eslint-v5.1.0-released/",
34
34
  deprecatedSince: "5.1.0",
35
- availableUntil: null,
35
+ availableUntil: "11.0.0",
36
36
  replacedBy: [
37
37
  {
38
38
  rule: {
@@ -33,7 +33,7 @@ module.exports = {
33
33
  message: "Formatting rules are being moved out of ESLint core.",
34
34
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
35
35
  deprecatedSince: "8.53.0",
36
- availableUntil: "10.0.0",
36
+ availableUntil: "11.0.0",
37
37
  replacedBy: [
38
38
  {
39
39
  message:
@@ -21,7 +21,7 @@ module.exports = {
21
21
  message: "Formatting rules are being moved out of ESLint core.",
22
22
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
23
23
  deprecatedSince: "8.53.0",
24
- availableUntil: "10.0.0",
24
+ availableUntil: "11.0.0",
25
25
  replacedBy: [
26
26
  {
27
27
  message:
@@ -24,7 +24,7 @@ module.exports = {
24
24
  message: "Formatting rules are being moved out of ESLint core.",
25
25
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
26
26
  deprecatedSince: "8.53.0",
27
- availableUntil: "10.0.0",
27
+ availableUntil: "11.0.0",
28
28
  replacedBy: [
29
29
  {
30
30
  message:
@@ -23,7 +23,7 @@ module.exports = {
23
23
  message: "Formatting rules are being moved out of ESLint core.",
24
24
  url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
25
25
  deprecatedSince: "8.53.0",
26
- availableUntil: "10.0.0",
26
+ availableUntil: "11.0.0",
27
27
  replacedBy: [
28
28
  {
29
29
  message: