@typescript-eslint/eslint-plugin 8.59.1-alpha.8 → 8.59.1-alpha.9
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.
|
@@ -51,7 +51,9 @@ function isAlwaysNullish(type) {
|
|
|
51
51
|
* `any` or `unknown` to be nullable.
|
|
52
52
|
*/
|
|
53
53
|
function isPossiblyNullish(type) {
|
|
54
|
-
return tsutils
|
|
54
|
+
return tsutils
|
|
55
|
+
.unionConstituents(type)
|
|
56
|
+
.some(t => isNullishType(t) || (0, util_1.isTypeFlagSet)(t, ts.TypeFlags.Void));
|
|
55
57
|
}
|
|
56
58
|
function toStaticValue(type) {
|
|
57
59
|
// type.isLiteral() only covers numbers/bigints and strings, hence the rest of the branches.
|
|
@@ -106,6 +106,11 @@ exports.default = (0, util_1.createRule)({
|
|
|
106
106
|
}
|
|
107
107
|
return {
|
|
108
108
|
TSTypeParameterInstantiation(node) {
|
|
109
|
+
// TypeScript does not apply default type parameters in instantiation
|
|
110
|
+
// expressions, so explicit type args here are always meaningful.
|
|
111
|
+
if (node.parent.type === utils_1.AST_NODE_TYPES.TSInstantiationExpression) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
109
114
|
const expression = services.esTreeNodeToTSNodeMap.get(node);
|
|
110
115
|
const typeParameters = getTypeParametersFromNode(node, expression, checker);
|
|
111
116
|
if (typeParameters) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/eslint-plugin",
|
|
3
|
-
"version": "8.59.1-alpha.
|
|
3
|
+
"version": "8.59.1-alpha.9",
|
|
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/scope-manager": "8.59.1-alpha.
|
|
56
|
-
"@typescript-eslint/utils": "8.59.1-alpha.
|
|
57
|
-
"@typescript-eslint/
|
|
58
|
-
"@typescript-eslint/
|
|
55
|
+
"@typescript-eslint/scope-manager": "8.59.1-alpha.9",
|
|
56
|
+
"@typescript-eslint/type-utils": "8.59.1-alpha.9",
|
|
57
|
+
"@typescript-eslint/visitor-keys": "8.59.1-alpha.9",
|
|
58
|
+
"@typescript-eslint/utils": "8.59.1-alpha.9"
|
|
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-
|
|
82
|
-
"@typescript-eslint/rule-
|
|
81
|
+
"@typescript-eslint/rule-tester": "8.59.1-alpha.9",
|
|
82
|
+
"@typescript-eslint/rule-schema-to-typescript-types": "8.59.1-alpha.9"
|
|
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.1-alpha.
|
|
87
|
+
"@typescript-eslint/parser": "^8.59.1-alpha.9"
|
|
88
88
|
},
|
|
89
89
|
"funding": {
|
|
90
90
|
"type": "opencollective",
|