@typescript-eslint/eslint-plugin 8.59.2-alpha.4 → 8.59.2-alpha.5
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.
|
@@ -124,12 +124,13 @@ exports.default = (0, util_1.createRule)({
|
|
|
124
124
|
case utils_1.AST_NODE_TYPES.Property:
|
|
125
125
|
// foo in "const { foo } = bar" will be processed twice, as parent.key
|
|
126
126
|
// and parent.value. The second is treated as a declaration.
|
|
127
|
-
if (parent.shorthand && parent.value === node) {
|
|
128
|
-
return parent.parent.type === utils_1.AST_NODE_TYPES.ObjectPattern;
|
|
129
|
-
}
|
|
130
127
|
if (parent.value === node) {
|
|
131
|
-
|
|
128
|
+
// const { foo: bar } = baz; -- bar IS a declaration.
|
|
129
|
+
// const baz = { foo: bar }; -- bar IS NOT a declaration.
|
|
130
|
+
return parent.parent.type === utils_1.AST_NODE_TYPES.ObjectPattern;
|
|
132
131
|
}
|
|
132
|
+
// const { foo: bar } = baz; -- foo IS NOT a declaration.
|
|
133
|
+
// const baz = { foo: bar }; -- foo IS a declaration.
|
|
133
134
|
return parent.parent.type === utils_1.AST_NODE_TYPES.ObjectExpression;
|
|
134
135
|
case utils_1.AST_NODE_TYPES.AssignmentPattern:
|
|
135
136
|
// foo in "const { foo = "" } = bar" will be processed twice, as parent.parent.key
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/eslint-plugin",
|
|
3
|
-
"version": "8.59.2-alpha.
|
|
3
|
+
"version": "8.59.2-alpha.5",
|
|
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/visitor-keys": "8.59.2-alpha.
|
|
55
|
+
"@typescript-eslint/type-utils": "8.59.2-alpha.5",
|
|
56
|
+
"@typescript-eslint/scope-manager": "8.59.2-alpha.5",
|
|
57
|
+
"@typescript-eslint/utils": "8.59.2-alpha.5",
|
|
58
|
+
"@typescript-eslint/visitor-keys": "8.59.2-alpha.5"
|
|
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.2-alpha.
|
|
82
|
-
"@typescript-eslint/rule-tester": "8.59.2-alpha.
|
|
81
|
+
"@typescript-eslint/rule-schema-to-typescript-types": "8.59.2-alpha.5",
|
|
82
|
+
"@typescript-eslint/rule-tester": "8.59.2-alpha.5"
|
|
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.2-alpha.
|
|
87
|
+
"@typescript-eslint/parser": "^8.59.2-alpha.5"
|
|
88
88
|
},
|
|
89
89
|
"funding": {
|
|
90
90
|
"type": "opencollective",
|