@typescript-eslint/eslint-plugin 8.59.4-alpha.8 → 8.59.4
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.
|
@@ -291,7 +291,10 @@ exports.default = (0, util_1.createRule)({
|
|
|
291
291
|
return { isUnhandled: true };
|
|
292
292
|
}
|
|
293
293
|
function isPromiseArray(node) {
|
|
294
|
-
const type =
|
|
294
|
+
const type = getTypeAtLocation(checker, node);
|
|
295
|
+
if (type == null) {
|
|
296
|
+
return false;
|
|
297
|
+
}
|
|
295
298
|
for (const ty of tsutils
|
|
296
299
|
.unionConstituents(type)
|
|
297
300
|
.map(t => checker.getApparentType(t))) {
|
|
@@ -363,3 +366,12 @@ function isFunctionParam(checker, param, node) {
|
|
|
363
366
|
}
|
|
364
367
|
return false;
|
|
365
368
|
}
|
|
369
|
+
function getTypeAtLocation(checker, node) {
|
|
370
|
+
try {
|
|
371
|
+
return checker.getTypeAtLocation(node);
|
|
372
|
+
}
|
|
373
|
+
catch {
|
|
374
|
+
// Workaround for https://github.com/typescript-eslint/typescript-eslint/issues/11947
|
|
375
|
+
return null;
|
|
376
|
+
}
|
|
377
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/eslint-plugin",
|
|
3
|
-
"version": "8.59.4
|
|
3
|
+
"version": "8.59.4",
|
|
4
4
|
"description": "TypeScript plugin for ESLint",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"ignore": "^7.0.5",
|
|
53
53
|
"natural-compare": "^1.4.0",
|
|
54
54
|
"ts-api-utils": "^2.5.0",
|
|
55
|
-
"@typescript-eslint/
|
|
56
|
-
"@typescript-eslint/
|
|
57
|
-
"@typescript-eslint/
|
|
58
|
-
"@typescript-eslint/
|
|
55
|
+
"@typescript-eslint/type-utils": "8.59.4",
|
|
56
|
+
"@typescript-eslint/utils": "8.59.4",
|
|
57
|
+
"@typescript-eslint/scope-manager": "8.59.4",
|
|
58
|
+
"@typescript-eslint/visitor-keys": "8.59.4"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/json-schema": "^7.0.15",
|
|
@@ -78,13 +78,13 @@
|
|
|
78
78
|
"typescript": ">=4.8.4 <6.1.0",
|
|
79
79
|
"unist-util-visit": "^5.0.0",
|
|
80
80
|
"vitest": "^4.0.18",
|
|
81
|
-
"@typescript-eslint/rule-schema-to-typescript-types": "8.59.4
|
|
82
|
-
"@typescript-eslint/rule-tester": "8.59.4
|
|
81
|
+
"@typescript-eslint/rule-schema-to-typescript-types": "8.59.4",
|
|
82
|
+
"@typescript-eslint/rule-tester": "8.59.4"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
|
86
86
|
"typescript": ">=4.8.4 <6.1.0",
|
|
87
|
-
"@typescript-eslint/parser": "^8.59.4
|
|
87
|
+
"@typescript-eslint/parser": "^8.59.4"
|
|
88
88
|
},
|
|
89
89
|
"funding": {
|
|
90
90
|
"type": "opencollective",
|