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.
- package/README.md +11 -1
- package/lib/cli-engine/lint-result-cache.js +47 -29
- package/lib/eslint/eslint-helpers.js +7 -4
- package/lib/eslint/eslint.js +151 -37
- package/lib/eslint/worker.js +1 -3
- package/lib/linter/esquery.js +1 -1
- package/lib/rules/array-bracket-newline.js +1 -1
- package/lib/rules/array-bracket-spacing.js +1 -1
- package/lib/rules/array-element-newline.js +1 -1
- package/lib/rules/arrow-parens.js +1 -1
- package/lib/rules/arrow-spacing.js +1 -1
- package/lib/rules/block-spacing.js +1 -1
- package/lib/rules/brace-style.js +1 -1
- package/lib/rules/callback-return.js +1 -1
- package/lib/rules/comma-dangle.js +1 -1
- package/lib/rules/comma-spacing.js +1 -1
- package/lib/rules/comma-style.js +1 -1
- package/lib/rules/complexity.js +6 -0
- package/lib/rules/computed-property-spacing.js +1 -1
- package/lib/rules/dot-location.js +1 -1
- package/lib/rules/eol-last.js +1 -1
- package/lib/rules/func-call-spacing.js +2 -2
- package/lib/rules/function-call-argument-newline.js +1 -1
- package/lib/rules/function-paren-newline.js +1 -1
- package/lib/rules/generator-star-spacing.js +1 -1
- package/lib/rules/global-require.js +1 -1
- package/lib/rules/handle-callback-err.js +1 -1
- package/lib/rules/id-blacklist.js +1 -1
- package/lib/rules/implicit-arrow-linebreak.js +1 -1
- package/lib/rules/indent-legacy.js +1 -0
- package/lib/rules/indent.js +1 -1
- package/lib/rules/jsx-quotes.js +1 -1
- package/lib/rules/key-spacing.js +1 -1
- package/lib/rules/keyword-spacing.js +1 -1
- package/lib/rules/line-comment-position.js +1 -1
- package/lib/rules/linebreak-style.js +1 -1
- package/lib/rules/lines-around-comment.js +1 -1
- package/lib/rules/lines-around-directive.js +1 -1
- package/lib/rules/lines-between-class-members.js +1 -1
- package/lib/rules/max-len.js +1 -1
- package/lib/rules/max-statements-per-line.js +1 -1
- package/lib/rules/multiline-comment-style.js +1 -1
- package/lib/rules/multiline-ternary.js +1 -1
- package/lib/rules/new-parens.js +1 -1
- package/lib/rules/newline-after-var.js +1 -1
- package/lib/rules/newline-before-return.js +1 -1
- package/lib/rules/newline-per-chained-call.js +1 -1
- package/lib/rules/no-buffer-constructor.js +1 -1
- package/lib/rules/no-catch-shadow.js +1 -1
- package/lib/rules/no-confusing-arrow.js +1 -1
- package/lib/rules/no-extra-parens.js +1 -1
- package/lib/rules/no-extra-semi.js +1 -1
- package/lib/rules/no-floating-decimal.js +1 -1
- package/lib/rules/no-loss-of-precision.js +206 -211
- package/lib/rules/no-mixed-operators.js +1 -1
- package/lib/rules/no-mixed-requires.js +1 -1
- package/lib/rules/no-mixed-spaces-and-tabs.js +1 -1
- package/lib/rules/no-multi-spaces.js +1 -1
- package/lib/rules/no-multiple-empty-lines.js +1 -1
- package/lib/rules/no-native-reassign.js +1 -1
- package/lib/rules/no-negated-in-lhs.js +1 -1
- package/lib/rules/no-new-object.js +1 -1
- package/lib/rules/no-new-require.js +1 -1
- package/lib/rules/no-new-symbol.js +1 -1
- package/lib/rules/no-path-concat.js +1 -1
- package/lib/rules/no-process-env.js +1 -1
- package/lib/rules/no-process-exit.js +1 -1
- package/lib/rules/no-restricted-imports.js +171 -4
- package/lib/rules/no-restricted-modules.js +1 -1
- package/lib/rules/no-spaced-func.js +1 -1
- package/lib/rules/no-sync.js +1 -1
- package/lib/rules/no-tabs.js +1 -1
- package/lib/rules/no-trailing-spaces.js +1 -1
- package/lib/rules/no-whitespace-before-property.js +1 -1
- package/lib/rules/nonblock-statement-body-position.js +1 -1
- package/lib/rules/object-curly-newline.js +1 -1
- package/lib/rules/object-curly-spacing.js +1 -1
- package/lib/rules/object-property-newline.js +1 -1
- package/lib/rules/one-var-declaration-per-line.js +1 -1
- package/lib/rules/operator-linebreak.js +1 -1
- package/lib/rules/padded-blocks.js +1 -1
- package/lib/rules/padding-line-between-statements.js +1 -1
- package/lib/rules/preserve-caught-error.js +1 -5
- package/lib/rules/quote-props.js +1 -1
- package/lib/rules/quotes.js +1 -1
- package/lib/rules/rest-spread-spacing.js +1 -1
- package/lib/rules/semi-spacing.js +1 -1
- package/lib/rules/semi-style.js +1 -1
- package/lib/rules/semi.js +1 -1
- package/lib/rules/space-before-blocks.js +1 -1
- package/lib/rules/space-before-function-paren.js +1 -1
- package/lib/rules/space-in-parens.js +1 -1
- package/lib/rules/space-infix-ops.js +1 -1
- package/lib/rules/space-unary-ops.js +1 -1
- package/lib/rules/spaced-comment.js +1 -1
- package/lib/rules/switch-colon-spacing.js +1 -1
- package/lib/rules/template-curly-spacing.js +1 -1
- package/lib/rules/template-tag-spacing.js +1 -1
- package/lib/rules/wrap-iife.js +1 -1
- package/lib/rules/wrap-regex.js +1 -1
- package/lib/rules/yield-star-spacing.js +1 -1
- package/lib/shared/serialization.js +1 -1
- package/lib/types/config-api.d.ts +6 -2
- package/lib/types/index.d.ts +92 -407
- package/lib/types/rules.d.ts +2 -0
- package/package.json +9 -9
package/lib/types/rules.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ import { Linter } from "./index";
|
|
|
38
38
|
interface NoRestrictedImportPathCommonOptions {
|
|
39
39
|
name: string;
|
|
40
40
|
message?: string;
|
|
41
|
+
allowTypeImports?: boolean;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
type EitherImportNamesOrAllowImportName =
|
|
@@ -50,6 +51,7 @@ type ValidNoRestrictedImportPathOptions = NoRestrictedImportPathCommonOptions &
|
|
|
50
51
|
interface NoRestrictedImportPatternCommonOptions {
|
|
51
52
|
message?: string;
|
|
52
53
|
caseSensitive?: boolean;
|
|
54
|
+
allowTypeImports?: boolean;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
// Base type for group or regex constraint, ensuring mutual exclusivity
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.38.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",
|
|
@@ -70,9 +70,10 @@
|
|
|
70
70
|
"test": "node Makefile.js test",
|
|
71
71
|
"test:browser": "node Makefile.js cypress",
|
|
72
72
|
"test:cli": "mocha",
|
|
73
|
+
"test:emfile": "node tools/check-emfile-handling.js",
|
|
73
74
|
"test:fuzz": "node Makefile.js fuzz",
|
|
74
75
|
"test:performance": "node Makefile.js perf",
|
|
75
|
-
"test:
|
|
76
|
+
"test:pnpm": "cd tests/pnpm && node check.js && pnpm install && pnpm exec tsc",
|
|
76
77
|
"test:types": "tsc -p tests/lib/types/tsconfig.json"
|
|
77
78
|
},
|
|
78
79
|
"gitHooks": {
|
|
@@ -106,17 +107,16 @@
|
|
|
106
107
|
"dependencies": {
|
|
107
108
|
"@eslint-community/eslint-utils": "^4.8.0",
|
|
108
109
|
"@eslint-community/regexpp": "^4.12.1",
|
|
109
|
-
"@eslint/config-array": "^0.21.
|
|
110
|
-
"@eslint/config-helpers": "^0.
|
|
111
|
-
"@eslint/core": "^0.
|
|
110
|
+
"@eslint/config-array": "^0.21.1",
|
|
111
|
+
"@eslint/config-helpers": "^0.4.1",
|
|
112
|
+
"@eslint/core": "^0.16.0",
|
|
112
113
|
"@eslint/eslintrc": "^3.3.1",
|
|
113
|
-
"@eslint/js": "9.
|
|
114
|
-
"@eslint/plugin-kit": "^0.
|
|
114
|
+
"@eslint/js": "9.38.0",
|
|
115
|
+
"@eslint/plugin-kit": "^0.4.0",
|
|
115
116
|
"@humanfs/node": "^0.16.6",
|
|
116
117
|
"@humanwhocodes/module-importer": "^1.0.1",
|
|
117
118
|
"@humanwhocodes/retry": "^0.4.2",
|
|
118
119
|
"@types/estree": "^1.0.6",
|
|
119
|
-
"@types/json-schema": "^7.0.15",
|
|
120
120
|
"ajv": "^6.12.4",
|
|
121
121
|
"chalk": "^4.0.0",
|
|
122
122
|
"cross-spawn": "^7.0.6",
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"globals": "^16.2.0",
|
|
174
174
|
"got": "^11.8.3",
|
|
175
175
|
"gray-matter": "^4.0.3",
|
|
176
|
-
"jiti": "^2.
|
|
176
|
+
"jiti": "^2.6.1",
|
|
177
177
|
"jiti-v2.0": "npm:jiti@2.0.x",
|
|
178
178
|
"jiti-v2.1": "npm:jiti@2.1.x",
|
|
179
179
|
"knip": "^5.60.2",
|