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
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ module.exports = function(it) {
4
+ const { pluginName, ruleId } = it;
5
+
6
+ return `
7
+ A configuration object specifies rule "${ruleId}", but could not find plugin "${pluginName}".
8
+
9
+ Common causes of this problem include:
10
+
11
+ 1. The "${pluginName}" plugin is not defined in your configuration file.
12
+ 2. The "${pluginName}" plugin is not defined within the same configuration object in which the "${ruleId}" rule is applied.
13
+ `.trimStart();
14
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint",
3
- "version": "9.20.1",
3
+ "version": "9.22.0",
4
4
  "author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
5
5
  "description": "An AST-based pattern checker for JavaScript.",
6
6
  "type": "commonjs",
@@ -14,13 +14,17 @@
14
14
  "types": "./lib/types/index.d.ts",
15
15
  "default": "./lib/api.js"
16
16
  },
17
+ "./config": {
18
+ "types": "./lib/types/config-api.d.ts",
19
+ "default": "./lib/config-api.js"
20
+ },
17
21
  "./package.json": "./package.json",
18
22
  "./use-at-your-own-risk": {
19
23
  "types": "./lib/types/use-at-your-own-risk.d.ts",
20
24
  "default": "./lib/unsupported-api.js"
21
25
  },
22
26
  "./rules": {
23
- "types": "./lib/types/rules/index.d.ts"
27
+ "types": "./lib/types/rules.d.ts"
24
28
  },
25
29
  "./universal": {
26
30
  "types": "./lib/types/universal.d.ts",
@@ -33,10 +37,13 @@
33
37
  "./lib/types/use-at-your-own-risk.d.ts"
34
38
  ],
35
39
  "rules": [
36
- "./lib/types/rules/index.d.ts"
40
+ "./lib/types/rules.d.ts"
37
41
  ],
38
42
  "universal": [
39
43
  "./lib/types/universal.d.ts"
44
+ ],
45
+ "config": [
46
+ "./lib/types/config-api.d.ts"
40
47
  ]
41
48
  }
42
49
  },
@@ -77,7 +84,7 @@
77
84
  "lib/rules/*.js": [
78
85
  "node tools/update-eslint-all.js",
79
86
  "node tools/update-rule-type-headers.js",
80
- "git add packages/js/src/configs/eslint-all.js \"lib/types/rules/*.ts\""
87
+ "git add packages/js/src/configs/eslint-all.js lib/types/rules.d.ts"
81
88
  ],
82
89
  "docs/src/rules/*.md": [
83
90
  "node tools/check-rule-examples.js",
@@ -101,14 +108,15 @@
101
108
  "dependencies": {
102
109
  "@eslint-community/eslint-utils": "^4.2.0",
103
110
  "@eslint-community/regexpp": "^4.12.1",
104
- "@eslint/config-array": "^0.19.0",
105
- "@eslint/core": "^0.11.0",
106
- "@eslint/eslintrc": "^3.2.0",
107
- "@eslint/js": "9.20.0",
108
- "@eslint/plugin-kit": "^0.2.5",
111
+ "@eslint/config-array": "^0.19.2",
112
+ "@eslint/config-helpers": "^0.1.0",
113
+ "@eslint/core": "^0.12.0",
114
+ "@eslint/eslintrc": "^3.3.0",
115
+ "@eslint/js": "9.22.0",
116
+ "@eslint/plugin-kit": "^0.2.7",
109
117
  "@humanfs/node": "^0.16.6",
110
118
  "@humanwhocodes/module-importer": "^1.0.1",
111
- "@humanwhocodes/retry": "^0.4.1",
119
+ "@humanwhocodes/retry": "^0.4.2",
112
120
  "@types/estree": "^1.0.6",
113
121
  "@types/json-schema": "^7.0.15",
114
122
  "ajv": "^6.12.4",
@@ -116,7 +124,7 @@
116
124
  "cross-spawn": "^7.0.6",
117
125
  "debug": "^4.3.2",
118
126
  "escape-string-regexp": "^4.0.0",
119
- "eslint-scope": "^8.2.0",
127
+ "eslint-scope": "^8.3.0",
120
128
  "eslint-visitor-keys": "^4.2.0",
121
129
  "espree": "^10.3.0",
122
130
  "esquery": "^1.5.0",