eslint 9.16.0 → 9.18.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/lib/cli.js +3 -4
- package/lib/config/config-loader.js +9 -22
- package/lib/eslint/eslint.js +2 -5
- package/lib/linter/source-code-fixer.js +1 -1
- package/lib/rules/arrow-body-style.js +1 -0
- package/lib/rules/camelcase.js +1 -0
- package/lib/rules/capitalized-comments.js +1 -0
- package/lib/rules/consistent-this.js +1 -0
- package/lib/rules/curly.js +1 -0
- package/lib/rules/default-case-last.js +2 -2
- package/lib/rules/default-param-last.js +1 -0
- package/lib/rules/dot-notation.js +1 -0
- package/lib/rules/for-direction.js +2 -2
- package/lib/rules/func-name-matching.js +1 -0
- package/lib/rules/func-style.js +1 -0
- package/lib/rules/id-denylist.js +1 -0
- package/lib/rules/id-length.js +1 -0
- package/lib/rules/id-match.js +1 -0
- package/lib/rules/init-declarations.js +1 -0
- package/lib/rules/logical-assignment-operators.js +1 -0
- package/lib/rules/no-console.js +3 -1
- package/lib/rules/no-continue.js +1 -0
- package/lib/rules/no-div-regex.js +1 -0
- package/lib/rules/no-else-return.js +1 -0
- package/lib/rules/no-extra-boolean-cast.js +1 -0
- package/lib/rules/no-extra-label.js +1 -0
- package/lib/rules/no-implicit-coercion.js +1 -0
- package/lib/rules/no-inline-comments.js +1 -0
- package/lib/rules/no-label-var.js +1 -0
- package/lib/rules/no-labels.js +1 -0
- package/lib/rules/no-lonely-if.js +1 -0
- package/lib/rules/no-magic-numbers.js +1 -0
- package/lib/rules/no-multi-str.js +1 -0
- package/lib/rules/no-negated-condition.js +1 -0
- package/lib/rules/no-nested-ternary.js +1 -0
- package/lib/rules/no-param-reassign.js +2 -2
- package/lib/rules/no-plusplus.js +1 -0
- package/lib/rules/no-script-url.js +3 -3
- package/lib/rules/no-shadow-restricted-names.js +17 -7
- package/lib/rules/no-ternary.js +1 -0
- package/lib/rules/no-undef-init.js +1 -0
- package/lib/rules/no-undefined.js +1 -0
- package/lib/rules/no-underscore-dangle.js +1 -0
- package/lib/rules/no-unneeded-ternary.js +1 -0
- package/lib/rules/no-unused-vars.js +613 -2
- package/lib/rules/no-useless-assignment.js +9 -0
- package/lib/rules/no-useless-computed-key.js +1 -0
- package/lib/rules/no-useless-concat.js +1 -0
- package/lib/rules/no-void.js +1 -0
- package/lib/rules/no-warning-comments.js +1 -0
- package/lib/rules/object-shorthand.js +1 -0
- package/lib/rules/one-var.js +1 -0
- package/lib/rules/operator-assignment.js +1 -0
- package/lib/rules/prefer-arrow-callback.js +1 -0
- package/lib/rules/prefer-destructuring.js +1 -0
- package/lib/rules/prefer-exponentiation-operator.js +1 -0
- package/lib/rules/prefer-numeric-literals.js +1 -0
- package/lib/rules/prefer-object-spread.js +3 -2
- package/lib/rules/prefer-spread.js +1 -0
- package/lib/rules/prefer-template.js +1 -0
- package/lib/rules/require-unicode-regexp.js +2 -2
- package/lib/rules/sort-imports.js +3 -2
- package/lib/rules/sort-keys.js +1 -0
- package/lib/rules/sort-vars.js +1 -0
- package/lib/rules/vars-on-top.js +1 -0
- package/lib/rules/yoda.js +1 -0
- package/lib/shared/flags.js +3 -3
- package/lib/types/index.d.ts +1 -1
- package/package.json +7 -7
package/lib/rules/no-void.js
CHANGED
package/lib/rules/one-var.js
CHANGED
@@ -47,6 +47,7 @@ module.exports = {
|
|
47
47
|
docs: {
|
48
48
|
description: "Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals",
|
49
49
|
recommended: false,
|
50
|
+
frozen: true,
|
50
51
|
url: "https://eslint.org/docs/latest/rules/prefer-numeric-literals"
|
51
52
|
},
|
52
53
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @fileoverview
|
2
|
+
* @fileoverview Rule to disallow using `Object.assign` with an object literal as the first argument and prefer the use of object spread instead
|
3
3
|
* @author Sharmila Jesupaul
|
4
4
|
*/
|
5
5
|
|
@@ -246,8 +246,9 @@ module.exports = {
|
|
246
246
|
|
247
247
|
docs: {
|
248
248
|
description:
|
249
|
-
"Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead",
|
249
|
+
"Disallow using `Object.assign` with an object literal as the first argument and prefer the use of object spread instead",
|
250
250
|
recommended: false,
|
251
|
+
frozen: true,
|
251
252
|
url: "https://eslint.org/docs/latest/rules/prefer-object-spread"
|
252
253
|
},
|
253
254
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @fileoverview Rule to enforce the use of `u` flag on
|
2
|
+
* @fileoverview Rule to enforce the use of `u` or `v` flag on regular expressions.
|
3
3
|
* @author Toru Nagashima
|
4
4
|
*/
|
5
5
|
|
@@ -48,7 +48,7 @@ module.exports = {
|
|
48
48
|
type: "suggestion",
|
49
49
|
|
50
50
|
docs: {
|
51
|
-
description: "Enforce the use of `u` or `v` flag on
|
51
|
+
description: "Enforce the use of `u` or `v` flag on regular expressions",
|
52
52
|
recommended: false,
|
53
53
|
url: "https://eslint.org/docs/latest/rules/require-unicode-regexp"
|
54
54
|
},
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @fileoverview Rule to
|
2
|
+
* @fileoverview Rule to enforce sorted `import` declarations within modules
|
3
3
|
* @author Christian Schuller
|
4
4
|
*/
|
5
5
|
|
@@ -23,8 +23,9 @@ module.exports = {
|
|
23
23
|
}],
|
24
24
|
|
25
25
|
docs: {
|
26
|
-
description: "Enforce sorted import declarations within modules",
|
26
|
+
description: "Enforce sorted `import` declarations within modules",
|
27
27
|
recommended: false,
|
28
|
+
frozen: true,
|
28
29
|
url: "https://eslint.org/docs/latest/rules/sort-imports"
|
29
30
|
},
|
30
31
|
|
package/lib/rules/sort-keys.js
CHANGED
package/lib/rules/sort-vars.js
CHANGED
package/lib/rules/vars-on-top.js
CHANGED
package/lib/rules/yoda.js
CHANGED
package/lib/shared/flags.js
CHANGED
@@ -10,8 +10,7 @@
|
|
10
10
|
*/
|
11
11
|
const activeFlags = new Map([
|
12
12
|
["test_only", "Used only for testing."],
|
13
|
-
["unstable_config_lookup_from_file", "Look up eslint.config.js from the file being linted."]
|
14
|
-
["unstable_ts_config", "Enable TypeScript configuration files."]
|
13
|
+
["unstable_config_lookup_from_file", "Look up `eslint.config.js` from the file being linted."]
|
15
14
|
]);
|
16
15
|
|
17
16
|
/**
|
@@ -19,7 +18,8 @@ const activeFlags = new Map([
|
|
19
18
|
* @type {Map<string, string>}
|
20
19
|
*/
|
21
20
|
const inactiveFlags = new Map([
|
22
|
-
["test_only_old", "Used only for testing."]
|
21
|
+
["test_only_old", "Used only for testing."],
|
22
|
+
["unstable_ts_config", "This flag is no longer required to enable TypeScript configuration files."]
|
23
23
|
]);
|
24
24
|
|
25
25
|
module.exports = {
|
package/lib/types/index.d.ts
CHANGED
@@ -1484,7 +1484,7 @@ export namespace ESLint {
|
|
1484
1484
|
allowInlineConfig?: boolean | undefined;
|
1485
1485
|
baseConfig?: Linter.Config | Linter.Config[] | null | undefined;
|
1486
1486
|
overrideConfig?: Linter.Config | Linter.Config[] | null | undefined;
|
1487
|
-
overrideConfigFile?: string |
|
1487
|
+
overrideConfigFile?: string | true | null | undefined;
|
1488
1488
|
plugins?: Record<string, Plugin> | null | undefined;
|
1489
1489
|
ruleFilter?: ((arg: { ruleId: string; severity: Exclude<Linter.Severity, 0> }) => boolean) | undefined;
|
1490
1490
|
stats?: boolean | undefined;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "eslint",
|
3
|
-
"version": "9.
|
3
|
+
"version": "9.18.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",
|
@@ -100,10 +100,10 @@
|
|
100
100
|
"@eslint-community/eslint-utils": "^4.2.0",
|
101
101
|
"@eslint-community/regexpp": "^4.12.1",
|
102
102
|
"@eslint/config-array": "^0.19.0",
|
103
|
-
"@eslint/core": "^0.
|
103
|
+
"@eslint/core": "^0.10.0",
|
104
104
|
"@eslint/eslintrc": "^3.2.0",
|
105
|
-
"@eslint/js": "9.
|
106
|
-
"@eslint/plugin-kit": "^0.2.
|
105
|
+
"@eslint/js": "9.18.0",
|
106
|
+
"@eslint/plugin-kit": "^0.2.5",
|
107
107
|
"@humanfs/node": "^0.16.6",
|
108
108
|
"@humanwhocodes/module-importer": "^1.0.1",
|
109
109
|
"@humanwhocodes/retry": "^0.4.1",
|
@@ -111,7 +111,7 @@
|
|
111
111
|
"@types/json-schema": "^7.0.15",
|
112
112
|
"ajv": "^6.12.4",
|
113
113
|
"chalk": "^4.0.0",
|
114
|
-
"cross-spawn": "^7.0.
|
114
|
+
"cross-spawn": "^7.0.6",
|
115
115
|
"debug": "^4.3.2",
|
116
116
|
"escape-string-regexp": "^4.0.0",
|
117
117
|
"eslint-scope": "^8.2.0",
|
@@ -136,7 +136,7 @@
|
|
136
136
|
"@arethetypeswrong/cli": "^0.17.0",
|
137
137
|
"@babel/core": "^7.4.3",
|
138
138
|
"@babel/preset-env": "^7.4.3",
|
139
|
-
"@eslint/json": "^0.
|
139
|
+
"@eslint/json": "^0.9.0",
|
140
140
|
"@trunkio/launcher": "^1.3.0",
|
141
141
|
"@types/node": "^20.11.5",
|
142
142
|
"@typescript-eslint/parser": "^8.4.0",
|
@@ -154,7 +154,7 @@
|
|
154
154
|
"eslint": "file:.",
|
155
155
|
"eslint-config-eslint": "file:packages/eslint-config-eslint",
|
156
156
|
"eslint-plugin-eslint-plugin": "^6.0.0",
|
157
|
-
"eslint-plugin-expect-type": "^0.
|
157
|
+
"eslint-plugin-expect-type": "^0.6.0",
|
158
158
|
"eslint-plugin-yml": "^1.14.0",
|
159
159
|
"eslint-release": "^3.3.0",
|
160
160
|
"eslint-rule-composer": "^0.3.0",
|