@typescript-eslint/eslint-plugin 8.46.1-alpha.2 → 8.46.1
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.
@@ -37,6 +37,7 @@ const utils_1 = require("@typescript-eslint/utils");
|
|
37
37
|
const tsutils = __importStar(require("ts-api-utils"));
|
38
38
|
const ts = __importStar(require("typescript"));
|
39
39
|
const util_1 = require("../util");
|
40
|
+
const promiseUtils_1 = require("../util/promiseUtils");
|
40
41
|
function parseChecksVoidReturn(checksVoidReturn) {
|
41
42
|
switch (checksVoidReturn) {
|
42
43
|
case false:
|
@@ -302,6 +303,10 @@ exports.default = (0, util_1.createRule)({
|
|
302
303
|
}
|
303
304
|
}
|
304
305
|
function checkArguments(node) {
|
306
|
+
if (node.type === utils_1.AST_NODE_TYPES.CallExpression &&
|
307
|
+
isPromiseFinallyMethod(node)) {
|
308
|
+
return;
|
309
|
+
}
|
305
310
|
const tsNode = services.esTreeNodeToTSNodeMap.get(node);
|
306
311
|
const voidArgs = voidFunctionArguments(checker, tsNode);
|
307
312
|
if (voidArgs.size === 0) {
|
@@ -467,6 +472,11 @@ exports.default = (0, util_1.createRule)({
|
|
467
472
|
});
|
468
473
|
}
|
469
474
|
}
|
475
|
+
function isPromiseFinallyMethod(node) {
|
476
|
+
const promiseFinallyCall = (0, promiseUtils_1.parseFinallyCall)(node, context);
|
477
|
+
return (promiseFinallyCall != null &&
|
478
|
+
(0, util_1.isPromiseLike)(services.program, (0, util_1.getConstrainedTypeAtLocation)(services, promiseFinallyCall.object)));
|
479
|
+
}
|
470
480
|
function checkClassLikeOrInterfaceNode(node) {
|
471
481
|
const tsNode = services.esTreeNodeToTSNodeMap.get(node);
|
472
482
|
const heritageTypes = getHeritageTypes(checker, tsNode);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@typescript-eslint/eslint-plugin",
|
3
|
-
"version": "8.46.1
|
3
|
+
"version": "8.46.1",
|
4
4
|
"description": "TypeScript plugin for ESLint",
|
5
5
|
"files": [
|
6
6
|
"dist",
|
@@ -59,10 +59,10 @@
|
|
59
59
|
},
|
60
60
|
"dependencies": {
|
61
61
|
"@eslint-community/regexpp": "^4.10.0",
|
62
|
-
"@typescript-eslint/scope-manager": "8.46.1
|
63
|
-
"@typescript-eslint/type-utils": "8.46.1
|
64
|
-
"@typescript-eslint/utils": "8.46.1
|
65
|
-
"@typescript-eslint/visitor-keys": "8.46.1
|
62
|
+
"@typescript-eslint/scope-manager": "8.46.1",
|
63
|
+
"@typescript-eslint/type-utils": "8.46.1",
|
64
|
+
"@typescript-eslint/utils": "8.46.1",
|
65
|
+
"@typescript-eslint/visitor-keys": "8.46.1",
|
66
66
|
"graphemer": "^1.4.0",
|
67
67
|
"ignore": "^7.0.0",
|
68
68
|
"natural-compare": "^1.4.0",
|
@@ -71,8 +71,8 @@
|
|
71
71
|
"devDependencies": {
|
72
72
|
"@types/mdast": "^4.0.3",
|
73
73
|
"@types/natural-compare": "*",
|
74
|
-
"@typescript-eslint/rule-schema-to-typescript-types": "8.46.1
|
75
|
-
"@typescript-eslint/rule-tester": "8.46.1
|
74
|
+
"@typescript-eslint/rule-schema-to-typescript-types": "8.46.1",
|
75
|
+
"@typescript-eslint/rule-tester": "8.46.1",
|
76
76
|
"@vitest/coverage-v8": "^3.1.3",
|
77
77
|
"ajv": "^6.12.6",
|
78
78
|
"cross-fetch": "*",
|
@@ -92,7 +92,7 @@
|
|
92
92
|
"vitest": "^3.1.3"
|
93
93
|
},
|
94
94
|
"peerDependencies": {
|
95
|
-
"@typescript-eslint/parser": "^8.46.1
|
95
|
+
"@typescript-eslint/parser": "^8.46.1",
|
96
96
|
"eslint": "^8.57.0 || ^9.0.0",
|
97
97
|
"typescript": ">=4.8.4 <6.0.0"
|
98
98
|
},
|