@typescript-eslint/typescript-estree 8.47.1-alpha.9 → 8.48.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/dist/check-modifiers.js
CHANGED
|
@@ -257,6 +257,14 @@ function checkModifiers(node) {
|
|
|
257
257
|
if (!(func?.kind === SyntaxKind.Constructor && nodeIsPresent(func.body))) {
|
|
258
258
|
throwError(modifier, 'A parameter property is only allowed in a constructor implementation.');
|
|
259
259
|
}
|
|
260
|
+
const param = node;
|
|
261
|
+
if (param.dotDotDotToken) {
|
|
262
|
+
throwError(modifier, 'A parameter property cannot be a rest parameter.');
|
|
263
|
+
}
|
|
264
|
+
if (param.name.kind === SyntaxKind.ArrayBindingPattern ||
|
|
265
|
+
param.name.kind === SyntaxKind.ObjectBindingPattern) {
|
|
266
|
+
throwError(modifier, 'A parameter property may not be declared using a binding pattern.');
|
|
267
|
+
}
|
|
260
268
|
}
|
|
261
269
|
// There are more cases in `checkGrammarObjectLiteralExpression` in TypeScript.
|
|
262
270
|
// We may add more validations for them here in the future.
|
package/dist/convert.js
CHANGED
|
@@ -2225,16 +2225,18 @@ class Converter {
|
|
|
2225
2225
|
],
|
|
2226
2226
|
});
|
|
2227
2227
|
}
|
|
2228
|
-
const
|
|
2228
|
+
const argument = this.convertChild(node.argument);
|
|
2229
|
+
const source = argument.literal;
|
|
2230
|
+
const result = this.createNode(node, this.#withDeprecatedGetter({
|
|
2229
2231
|
type: ts_estree_1.AST_NODE_TYPES.TSImportType,
|
|
2230
2232
|
range,
|
|
2231
|
-
argument: this.convertChild(node.argument),
|
|
2232
2233
|
options,
|
|
2233
2234
|
qualifier: this.convertChild(node.qualifier),
|
|
2235
|
+
source,
|
|
2234
2236
|
typeArguments: node.typeArguments
|
|
2235
2237
|
? this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node)
|
|
2236
2238
|
: null,
|
|
2237
|
-
});
|
|
2239
|
+
}, 'argument', 'source', argument));
|
|
2238
2240
|
if (node.isTypeOf) {
|
|
2239
2241
|
return this.createNode(node, {
|
|
2240
2242
|
type: ts_estree_1.AST_NODE_TYPES.TSTypeQuery,
|
|
@@ -7,8 +7,7 @@ exports.clearGlobCache = clearGlobCache;
|
|
|
7
7
|
exports.resolveProjectList = resolveProjectList;
|
|
8
8
|
exports.clearGlobResolutionCache = clearGlobResolutionCache;
|
|
9
9
|
const debug_1 = __importDefault(require("debug"));
|
|
10
|
-
const
|
|
11
|
-
const is_glob_1 = __importDefault(require("is-glob"));
|
|
10
|
+
const tinyglobby_1 = require("tinyglobby");
|
|
12
11
|
const shared_1 = require("../create-program/shared");
|
|
13
12
|
const ExpiringCache_1 = require("./ExpiringCache");
|
|
14
13
|
const log = (0, debug_1.default)('typescript-eslint:typescript-estree:parseSettings:resolveProjectList');
|
|
@@ -32,10 +31,7 @@ function resolveProjectList(options) {
|
|
|
32
31
|
if (sanitizedProjects.length === 0) {
|
|
33
32
|
return new Map();
|
|
34
33
|
}
|
|
35
|
-
const projectFolderIgnoreList = (options.projectFolderIgnoreList ?? ['**/node_modules/**'])
|
|
36
|
-
.filter(folder => typeof folder === 'string')
|
|
37
|
-
// prefix with a ! for not match glob
|
|
38
|
-
.map(folder => (folder.startsWith('!') ? folder : `!${folder}`));
|
|
34
|
+
const projectFolderIgnoreList = (options.projectFolderIgnoreList ?? ['**/node_modules/**']).filter(folder => typeof folder === 'string');
|
|
39
35
|
const cacheKey = getHash({
|
|
40
36
|
project: sanitizedProjects,
|
|
41
37
|
projectFolderIgnoreList,
|
|
@@ -58,15 +54,15 @@ function resolveProjectList(options) {
|
|
|
58
54
|
}
|
|
59
55
|
}
|
|
60
56
|
// Transform glob patterns into paths
|
|
61
|
-
const nonGlobProjects = sanitizedProjects.filter(project => !(0,
|
|
62
|
-
const globProjects = sanitizedProjects.filter(project => (0,
|
|
57
|
+
const nonGlobProjects = sanitizedProjects.filter(project => !(0, tinyglobby_1.isDynamicPattern)(project));
|
|
58
|
+
const globProjects = sanitizedProjects.filter(project => (0, tinyglobby_1.isDynamicPattern)(project));
|
|
63
59
|
let globProjectPaths = [];
|
|
64
60
|
if (globProjects.length > 0) {
|
|
65
|
-
//
|
|
66
|
-
// to improve performance. To ensure the order is correct, we need to call fast-glob for each pattern
|
|
61
|
+
// To ensure the order is correct, we need to glob for each pattern
|
|
67
62
|
// separately and then concatenate the results in patterns' order.
|
|
68
|
-
globProjectPaths = globProjects.flatMap(pattern => (0,
|
|
63
|
+
globProjectPaths = globProjects.flatMap(pattern => (0, tinyglobby_1.globSync)(pattern, {
|
|
69
64
|
cwd: options.tsconfigRootDir,
|
|
65
|
+
expandDirectories: false,
|
|
70
66
|
ignore: projectFolderIgnoreList,
|
|
71
67
|
}));
|
|
72
68
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/typescript-estree",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.48.0",
|
|
4
4
|
"description": "A parser that converts TypeScript source code into an ESTree compatible form",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -52,19 +52,17 @@
|
|
|
52
52
|
"typecheck": "yarn run -BT nx typecheck"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@typescript-eslint/project-service": "8.
|
|
56
|
-
"@typescript-eslint/tsconfig-utils": "8.
|
|
57
|
-
"@typescript-eslint/types": "8.
|
|
58
|
-
"@typescript-eslint/visitor-keys": "8.
|
|
55
|
+
"@typescript-eslint/project-service": "8.48.0",
|
|
56
|
+
"@typescript-eslint/tsconfig-utils": "8.48.0",
|
|
57
|
+
"@typescript-eslint/types": "8.48.0",
|
|
58
|
+
"@typescript-eslint/visitor-keys": "8.48.0",
|
|
59
59
|
"debug": "^4.3.4",
|
|
60
|
-
"fast-glob": "^3.3.2",
|
|
61
|
-
"is-glob": "^4.0.3",
|
|
62
60
|
"minimatch": "^9.0.4",
|
|
63
61
|
"semver": "^7.6.0",
|
|
62
|
+
"tinyglobby": "^0.2.15",
|
|
64
63
|
"ts-api-utils": "^2.1.0"
|
|
65
64
|
},
|
|
66
65
|
"devDependencies": {
|
|
67
|
-
"@types/is-glob": "^4.0.4",
|
|
68
66
|
"@vitest/coverage-v8": "^3.1.3",
|
|
69
67
|
"eslint": "*",
|
|
70
68
|
"glob": "*",
|