eslint 9.20.1 → 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 +2 -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 +8 -4
- package/messages/config-plugin-missing.js +14 -0
- package/package.json +7 -7
package/README.md
CHANGED
@@ -319,8 +319,8 @@ to get your logo on our READMEs and [website](https://eslint.org/sponsors).
|
|
319
319
|
<h3>Platinum Sponsors</h3>
|
320
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>
|
321
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>
|
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></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></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>
|
324
324
|
<h3>Technology Sponsors</h3>
|
325
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.
|
326
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>
|
package/conf/rule-type-list.json
CHANGED
@@ -6,24 +6,88 @@
|
|
6
6
|
},
|
7
7
|
"deprecated": [],
|
8
8
|
"removed": [
|
9
|
-
{
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
{
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
{
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
{
|
25
|
-
|
26
|
-
|
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
|
-
|
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
|
-
|
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
|
/**
|
package/lib/eslint/eslint.js
CHANGED
@@ -203,7 +203,13 @@ function getOrFindUsedDeprecatedRules(eslint, maybeFilePath) {
|
|
203
203
|
const meta = rule && rule.meta;
|
204
204
|
|
205
205
|
if (meta && meta.deprecated) {
|
206
|
-
|
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:
|
19
|
-
|
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:
|
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: "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:
|
19
|
-
|
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:
|
35
|
-
|
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:
|
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: "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:
|
19
|
-
|
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: {
|
package/lib/rules/brace-style.js
CHANGED
@@ -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:
|
19
|
-
|
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:
|
16
|
-
|
17
|
-
|
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:
|
78
|
-
|
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:
|
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: "comma-spacing",
|
32
|
+
url: "https://eslint.style/rules/js/comma-spacing"
|
33
|
+
}
|
34
|
+
}
|
35
|
+
]
|
36
|
+
},
|
19
37
|
type: "layout",
|
20
38
|
|
21
39
|
docs: {
|
package/lib/rules/comma-style.js
CHANGED
@@ -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:
|
19
|
-
|
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:
|
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: "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:
|
19
|
-
|
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: {
|
package/lib/rules/eol-last.js
CHANGED
@@ -12,8 +12,26 @@
|
|
12
12
|
/** @type {import('../shared/types').Rule} */
|
13
13
|
module.exports = {
|
14
14
|
meta: {
|
15
|
-
deprecated:
|
16
|
-
|
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: "eol-last",
|
30
|
+
url: "https://eslint.style/rules/js/eol-last"
|
31
|
+
}
|
32
|
+
}
|
33
|
+
]
|
34
|
+
},
|
17
35
|
type: "layout",
|
18
36
|
|
19
37
|
docs: {
|