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.
- package/README.md +13 -2
- package/conf/rule-type-list.json +82 -18
- package/lib/cli.js +23 -0
- package/lib/config/rule-validator.js +12 -2
- package/lib/eslint/eslint.js +7 -1
- package/lib/options.js +6 -0
- package/lib/rules/array-bracket-newline.js +20 -2
- package/lib/rules/array-bracket-spacing.js +20 -2
- package/lib/rules/array-element-newline.js +20 -2
- package/lib/rules/arrow-parens.js +20 -2
- package/lib/rules/arrow-spacing.js +20 -2
- package/lib/rules/block-spacing.js +20 -2
- package/lib/rules/brace-style.js +20 -2
- package/lib/rules/callback-return.js +19 -3
- package/lib/rules/comma-dangle.js +20 -2
- package/lib/rules/comma-spacing.js +20 -2
- package/lib/rules/comma-style.js +20 -2
- package/lib/rules/computed-property-spacing.js +20 -2
- package/lib/rules/dot-location.js +20 -2
- package/lib/rules/eol-last.js +20 -2
- package/lib/rules/func-call-spacing.js +20 -2
- package/lib/rules/function-call-argument-newline.js +20 -2
- package/lib/rules/function-paren-newline.js +20 -2
- package/lib/rules/generator-star-spacing.js +20 -2
- package/lib/rules/global-require.js +19 -3
- package/lib/rules/handle-callback-err.js +19 -3
- package/lib/rules/id-blacklist.js +14 -2
- package/lib/rules/implicit-arrow-linebreak.js +20 -2
- package/lib/rules/indent-legacy.js +19 -3
- package/lib/rules/indent.js +20 -2
- package/lib/rules/jsx-quotes.js +20 -2
- package/lib/rules/key-spacing.js +20 -2
- package/lib/rules/keyword-spacing.js +20 -2
- package/lib/rules/line-comment-position.js +20 -2
- package/lib/rules/linebreak-style.js +20 -2
- package/lib/rules/lines-around-comment.js +20 -2
- package/lib/rules/lines-around-directive.js +20 -2
- package/lib/rules/lines-between-class-members.js +20 -2
- package/lib/rules/max-len.js +20 -2
- package/lib/rules/max-statements-per-line.js +20 -2
- package/lib/rules/multiline-comment-style.js +20 -2
- package/lib/rules/multiline-ternary.js +20 -2
- package/lib/rules/new-parens.js +20 -2
- package/lib/rules/newline-after-var.js +20 -3
- package/lib/rules/newline-before-return.js +20 -2
- package/lib/rules/newline-per-chained-call.js +20 -2
- package/lib/rules/no-buffer-constructor.js +19 -3
- package/lib/rules/no-catch-shadow.js +14 -3
- package/lib/rules/no-confusing-arrow.js +20 -2
- package/lib/rules/no-extra-parens.js +20 -2
- package/lib/rules/no-extra-semi.js +20 -2
- package/lib/rules/no-floating-decimal.js +20 -2
- package/lib/rules/no-mixed-operators.js +20 -2
- package/lib/rules/no-mixed-requires.js +19 -3
- package/lib/rules/no-mixed-spaces-and-tabs.js +20 -2
- package/lib/rules/no-multi-spaces.js +20 -2
- package/lib/rules/no-multiple-empty-lines.js +20 -2
- package/lib/rules/no-native-reassign.js +14 -3
- package/lib/rules/no-negated-in-lhs.js +14 -3
- package/lib/rules/no-new-object.js +14 -5
- package/lib/rules/no-new-require.js +19 -3
- package/lib/rules/no-new-symbol.js +14 -5
- package/lib/rules/no-path-concat.js +19 -3
- package/lib/rules/no-process-env.js +19 -3
- package/lib/rules/no-process-exit.js +19 -3
- package/lib/rules/no-restricted-modules.js +19 -3
- package/lib/rules/no-return-await.js +7 -3
- package/lib/rules/no-spaced-func.js +20 -3
- package/lib/rules/no-sync.js +19 -3
- package/lib/rules/no-tabs.js +20 -2
- package/lib/rules/no-trailing-spaces.js +20 -2
- package/lib/rules/no-whitespace-before-property.js +20 -2
- package/lib/rules/nonblock-statement-body-position.js +20 -2
- package/lib/rules/object-curly-newline.js +20 -2
- package/lib/rules/object-curly-spacing.js +20 -2
- package/lib/rules/object-property-newline.js +20 -2
- package/lib/rules/one-var-declaration-per-line.js +20 -2
- package/lib/rules/operator-linebreak.js +20 -2
- package/lib/rules/padded-blocks.js +20 -2
- package/lib/rules/padding-line-between-statements.js +20 -2
- package/lib/rules/prefer-reflect.js +7 -3
- package/lib/rules/quote-props.js +20 -2
- package/lib/rules/quotes.js +20 -2
- package/lib/rules/rest-spread-spacing.js +20 -2
- package/lib/rules/semi-spacing.js +20 -2
- package/lib/rules/semi-style.js +20 -2
- package/lib/rules/semi.js +20 -2
- package/lib/rules/space-before-blocks.js +20 -2
- package/lib/rules/space-before-function-paren.js +20 -2
- package/lib/rules/space-in-parens.js +20 -2
- package/lib/rules/space-infix-ops.js +20 -2
- package/lib/rules/space-unary-ops.js +20 -2
- package/lib/rules/spaced-comment.js +20 -2
- package/lib/rules/switch-colon-spacing.js +20 -2
- package/lib/rules/template-curly-spacing.js +20 -2
- package/lib/rules/template-tag-spacing.js +20 -2
- package/lib/rules/wrap-iife.js +20 -2
- package/lib/rules/wrap-regex.js +20 -2
- package/lib/rules/yield-star-spacing.js +20 -2
- package/lib/shared/types.js +19 -1
- package/lib/types/index.d.ts +13 -5
- package/messages/config-plugin-missing.js +14 -0
- package/package.json +7 -7
package/lib/rules/semi-style.js
CHANGED
@@ -71,8 +71,26 @@ function isLastChild(node) {
|
|
71
71
|
/** @type {import('../shared/types').Rule} */
|
72
72
|
module.exports = {
|
73
73
|
meta: {
|
74
|
-
deprecated:
|
75
|
-
|
74
|
+
deprecated: {
|
75
|
+
message: "Formatting rules are being moved out of ESLint core.",
|
76
|
+
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
|
77
|
+
deprecatedSince: "8.53.0",
|
78
|
+
availableUntil: "10.0.0",
|
79
|
+
replacedBy: [
|
80
|
+
{
|
81
|
+
message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
|
82
|
+
url: "https://eslint.style/guide/migration",
|
83
|
+
plugin: {
|
84
|
+
name: "@stylistic/eslint-plugin-js",
|
85
|
+
url: "https://eslint.style/packages/js"
|
86
|
+
},
|
87
|
+
rule: {
|
88
|
+
name: "semi-style",
|
89
|
+
url: "https://eslint.style/rules/js/semi-style"
|
90
|
+
}
|
91
|
+
}
|
92
|
+
]
|
93
|
+
},
|
76
94
|
type: "layout",
|
77
95
|
|
78
96
|
docs: {
|
package/lib/rules/semi.js
CHANGED
@@ -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:
|
23
|
-
|
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: "semi",
|
37
|
+
url: "https://eslint.style/rules/js/semi"
|
38
|
+
}
|
39
|
+
}
|
40
|
+
]
|
41
|
+
},
|
24
42
|
type: "layout",
|
25
43
|
|
26
44
|
docs: {
|
@@ -38,8 +38,26 @@ function isFunctionBody(node) {
|
|
38
38
|
/** @type {import('../shared/types').Rule} */
|
39
39
|
module.exports = {
|
40
40
|
meta: {
|
41
|
-
deprecated:
|
42
|
-
|
41
|
+
deprecated: {
|
42
|
+
message: "Formatting rules are being moved out of ESLint core.",
|
43
|
+
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
|
44
|
+
deprecatedSince: "8.53.0",
|
45
|
+
availableUntil: "10.0.0",
|
46
|
+
replacedBy: [
|
47
|
+
{
|
48
|
+
message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
|
49
|
+
url: "https://eslint.style/guide/migration",
|
50
|
+
plugin: {
|
51
|
+
name: "@stylistic/eslint-plugin-js",
|
52
|
+
url: "https://eslint.style/packages/js"
|
53
|
+
},
|
54
|
+
rule: {
|
55
|
+
name: "space-before-blocks",
|
56
|
+
url: "https://eslint.style/rules/js/space-before-blocks"
|
57
|
+
}
|
58
|
+
}
|
59
|
+
]
|
60
|
+
},
|
43
61
|
type: "layout",
|
44
62
|
|
45
63
|
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:
|
22
|
-
|
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: "space-before-function-paren",
|
36
|
+
url: "https://eslint.style/rules/js/space-before-function-paren"
|
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:
|
18
|
-
|
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: "space-in-parens",
|
32
|
+
url: "https://eslint.style/rules/js/space-in-parens"
|
33
|
+
}
|
34
|
+
}
|
35
|
+
]
|
36
|
+
},
|
19
37
|
type: "layout",
|
20
38
|
|
21
39
|
docs: {
|
@@ -14,8 +14,26 @@ const { isEqToken } = require("./utils/ast-utils");
|
|
14
14
|
/** @type {import('../shared/types').Rule} */
|
15
15
|
module.exports = {
|
16
16
|
meta: {
|
17
|
-
deprecated:
|
18
|
-
|
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: "space-infix-ops",
|
32
|
+
url: "https://eslint.style/rules/js/space-infix-ops"
|
33
|
+
}
|
34
|
+
}
|
35
|
+
]
|
36
|
+
},
|
19
37
|
type: "layout",
|
20
38
|
|
21
39
|
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:
|
22
|
-
|
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: "space-unary-ops",
|
36
|
+
url: "https://eslint.style/rules/js/space-unary-ops"
|
37
|
+
}
|
38
|
+
}
|
39
|
+
]
|
40
|
+
},
|
23
41
|
type: "layout",
|
24
42
|
|
25
43
|
docs: {
|
@@ -150,8 +150,26 @@ function createNeverStylePattern(markers) {
|
|
150
150
|
/** @type {import('../shared/types').Rule} */
|
151
151
|
module.exports = {
|
152
152
|
meta: {
|
153
|
-
deprecated:
|
154
|
-
|
153
|
+
deprecated: {
|
154
|
+
message: "Formatting rules are being moved out of ESLint core.",
|
155
|
+
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
|
156
|
+
deprecatedSince: "8.53.0",
|
157
|
+
availableUntil: "10.0.0",
|
158
|
+
replacedBy: [
|
159
|
+
{
|
160
|
+
message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
|
161
|
+
url: "https://eslint.style/guide/migration",
|
162
|
+
plugin: {
|
163
|
+
name: "@stylistic/eslint-plugin-js",
|
164
|
+
url: "https://eslint.style/packages/js"
|
165
|
+
},
|
166
|
+
rule: {
|
167
|
+
name: "spaced-comment",
|
168
|
+
url: "https://eslint.style/rules/js/spaced-comment"
|
169
|
+
}
|
170
|
+
}
|
171
|
+
]
|
172
|
+
},
|
155
173
|
type: "suggestion",
|
156
174
|
|
157
175
|
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:
|
23
|
-
|
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: "switch-colon-spacing",
|
37
|
+
url: "https://eslint.style/rules/js/switch-colon-spacing"
|
38
|
+
}
|
39
|
+
}
|
40
|
+
]
|
41
|
+
},
|
24
42
|
type: "layout",
|
25
43
|
|
26
44
|
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:
|
23
|
-
|
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: "template-curly-spacing",
|
37
|
+
url: "https://eslint.style/rules/js/template-curly-spacing"
|
38
|
+
}
|
39
|
+
}
|
40
|
+
]
|
41
|
+
},
|
24
42
|
type: "layout",
|
25
43
|
|
26
44
|
docs: {
|
@@ -13,8 +13,26 @@
|
|
13
13
|
/** @type {import('../shared/types').Rule} */
|
14
14
|
module.exports = {
|
15
15
|
meta: {
|
16
|
-
deprecated:
|
17
|
-
|
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: "template-tag-spacing",
|
31
|
+
url: "https://eslint.style/rules/js/template-tag-spacing"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
]
|
35
|
+
},
|
18
36
|
type: "layout",
|
19
37
|
|
20
38
|
docs: {
|
package/lib/rules/wrap-iife.js
CHANGED
@@ -41,8 +41,26 @@ function isCalleeOfNewExpression(node) {
|
|
41
41
|
/** @type {import('../shared/types').Rule} */
|
42
42
|
module.exports = {
|
43
43
|
meta: {
|
44
|
-
deprecated:
|
45
|
-
|
44
|
+
deprecated: {
|
45
|
+
message: "Formatting rules are being moved out of ESLint core.",
|
46
|
+
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
|
47
|
+
deprecatedSince: "8.53.0",
|
48
|
+
availableUntil: "10.0.0",
|
49
|
+
replacedBy: [
|
50
|
+
{
|
51
|
+
message: "ESLint Stylistic now maintains deprecated stylistic core rules.",
|
52
|
+
url: "https://eslint.style/guide/migration",
|
53
|
+
plugin: {
|
54
|
+
name: "@stylistic/eslint-plugin-js",
|
55
|
+
url: "https://eslint.style/packages/js"
|
56
|
+
},
|
57
|
+
rule: {
|
58
|
+
name: "wrap-iife",
|
59
|
+
url: "https://eslint.style/rules/js/wrap-iife"
|
60
|
+
}
|
61
|
+
}
|
62
|
+
]
|
63
|
+
},
|
46
64
|
type: "layout",
|
47
65
|
|
48
66
|
docs: {
|
package/lib/rules/wrap-regex.js
CHANGED
@@ -13,8 +13,26 @@
|
|
13
13
|
/** @type {import('../shared/types').Rule} */
|
14
14
|
module.exports = {
|
15
15
|
meta: {
|
16
|
-
deprecated:
|
17
|
-
|
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: "wrap-regex",
|
31
|
+
url: "https://eslint.style/rules/js/wrap-regex"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
]
|
35
|
+
},
|
18
36
|
type: "layout",
|
19
37
|
|
20
38
|
docs: {
|
@@ -13,8 +13,26 @@
|
|
13
13
|
/** @type {import('../shared/types').Rule} */
|
14
14
|
module.exports = {
|
15
15
|
meta: {
|
16
|
-
deprecated:
|
17
|
-
|
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: "yield-star-spacing",
|
31
|
+
url: "https://eslint.style/rules/js/yield-star-spacing"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
]
|
35
|
+
},
|
18
36
|
type: "layout",
|
19
37
|
|
20
38
|
docs: {
|
package/lib/shared/types.js
CHANGED
@@ -145,9 +145,26 @@ module.exports = {};
|
|
145
145
|
* @property {string} url The URL of the rule documentation.
|
146
146
|
*/
|
147
147
|
|
148
|
+
/**
|
149
|
+
* @typedef {Object} DeprecatedInfo
|
150
|
+
* @property {string} [message] General message presented to the user
|
151
|
+
* @property {string} [url] URL to more information about this deprecation in general
|
152
|
+
* @property {ReplacedByInfo[]} [replacedBy] Potential replacements for the rule
|
153
|
+
* @property {string} [deprecatedSince] Version since the rule is deprecated
|
154
|
+
* @property {?string} [availableUntil] Version until it is available or null if indefinite
|
155
|
+
*/
|
156
|
+
|
157
|
+
/**
|
158
|
+
* @typedef {Object} ReplacedByInfo
|
159
|
+
* @property {string} [message] General message presented to the user
|
160
|
+
* @property {string} [url] URL to more information about this replacement in general
|
161
|
+
* @property {{ name?: string, url?: string }} [plugin] Use "eslint" for a core rule. Omit if the rule is in the same plugin.
|
162
|
+
* @property {{ name?: string, url?: string }} [rule] Name and information of the replacement rule
|
163
|
+
*/
|
164
|
+
|
148
165
|
/**
|
149
166
|
* @typedef {Object} RuleMeta
|
150
|
-
* @property {boolean} [deprecated] If `true` then the rule has been deprecated.
|
167
|
+
* @property {boolean|DeprecatedInfo} [deprecated] If `true` then the rule has been deprecated.
|
151
168
|
* @property {Array} [defaultOptions] Default options for the rule.
|
152
169
|
* @property {RuleMetaDocs} docs The document information of the rule.
|
153
170
|
* @property {"code"|"whitespace"} [fixable] The autofix type.
|
@@ -177,6 +194,7 @@ module.exports = {};
|
|
177
194
|
* @typedef {Object} DeprecatedRuleInfo
|
178
195
|
* @property {string} ruleId The rule ID.
|
179
196
|
* @property {string[]} replacedBy The rule IDs that replace this deprecated rule.
|
197
|
+
* @property {DeprecatedInfo} [info] The raw deprecated info provided by rule. Unset if `deprecated` is a boolean.
|
180
198
|
*/
|
181
199
|
|
182
200
|
/**
|
package/lib/types/index.d.ts
CHANGED
@@ -34,7 +34,9 @@ import type {
|
|
34
34
|
TraversalStep,
|
35
35
|
LanguageOptions as GenericLanguageOptions,
|
36
36
|
RuleDefinition,
|
37
|
-
RuleContext as CoreRuleContext
|
37
|
+
RuleContext as CoreRuleContext,
|
38
|
+
RuleContextTypeOptions,
|
39
|
+
DeprecatedInfo
|
38
40
|
} from "@eslint/core";
|
39
41
|
import { JSONSchema4 } from "json-schema";
|
40
42
|
import { LegacyESLint } from "./use-at-your-own-risk.js";
|
@@ -779,9 +781,12 @@ export namespace Rule {
|
|
779
781
|
/** Any default options to be recursively merged on top of any user-provided options. */
|
780
782
|
defaultOptions?: unknown[];
|
781
783
|
|
782
|
-
/** Indicates whether the rule has been deprecated. Omit if not deprecated. */
|
783
|
-
deprecated?: boolean | undefined;
|
784
|
-
/**
|
784
|
+
/** Indicates whether the rule has been deprecated or provides additional metadata about the deprecation. Omit if not deprecated. */
|
785
|
+
deprecated?: boolean | DeprecatedInfo | undefined;
|
786
|
+
/**
|
787
|
+
* @deprecated Use deprecated.replacedBy instead.
|
788
|
+
* The name of the rule(s) this rule was replaced by, if it was deprecated.
|
789
|
+
*/
|
785
790
|
replacedBy?: readonly string[];
|
786
791
|
|
787
792
|
/**
|
@@ -800,7 +805,10 @@ export namespace Rule {
|
|
800
805
|
hasSuggestions?: boolean | undefined;
|
801
806
|
}
|
802
807
|
|
803
|
-
interface RuleContext extends CoreRuleContext {
|
808
|
+
interface RuleContext extends CoreRuleContext<RuleContextTypeOptions & {
|
809
|
+
LangOptions: Linter.LanguageOptions;
|
810
|
+
Code: SourceCode;
|
811
|
+
Node: ESTree.Node; }> {
|
804
812
|
// report(descriptor: ReportDescriptor): void;
|
805
813
|
}
|
806
814
|
|
@@ -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.
|
3
|
+
"version": "9.21.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",
|
@@ -101,14 +101,14 @@
|
|
101
101
|
"dependencies": {
|
102
102
|
"@eslint-community/eslint-utils": "^4.2.0",
|
103
103
|
"@eslint-community/regexpp": "^4.12.1",
|
104
|
-
"@eslint/config-array": "^0.19.
|
105
|
-
"@eslint/core": "^0.
|
106
|
-
"@eslint/eslintrc": "^3.
|
107
|
-
"@eslint/js": "9.
|
108
|
-
"@eslint/plugin-kit": "^0.2.
|
104
|
+
"@eslint/config-array": "^0.19.2",
|
105
|
+
"@eslint/core": "^0.12.0",
|
106
|
+
"@eslint/eslintrc": "^3.3.0",
|
107
|
+
"@eslint/js": "9.21.0",
|
108
|
+
"@eslint/plugin-kit": "^0.2.7",
|
109
109
|
"@humanfs/node": "^0.16.6",
|
110
110
|
"@humanwhocodes/module-importer": "^1.0.1",
|
111
|
-
"@humanwhocodes/retry": "^0.4.
|
111
|
+
"@humanwhocodes/retry": "^0.4.2",
|
112
112
|
"@types/estree": "^1.0.6",
|
113
113
|
"@types/json-schema": "^7.0.15",
|
114
114
|
"ajv": "^6.12.4",
|