@eslint-react/jsx 5.18.6 → 5.18.8
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/index.js +4 -4
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Traverse } from "@eslint-react/ast";
|
|
1
|
+
import { Check, Traverse } from "@eslint-react/ast";
|
|
2
2
|
import { resolve } from "@eslint-react/var";
|
|
3
3
|
import { AST_NODE_TYPES } from "@typescript-eslint/types";
|
|
4
4
|
import { getStaticValue } from "@typescript-eslint/utils/ast-utils";
|
|
@@ -572,9 +572,9 @@ function findParentAttribute(node, test = () => true) {
|
|
|
572
572
|
*/
|
|
573
573
|
function findSpreadProperty(context, argument, name, seen = /* @__PURE__ */ new Set()) {
|
|
574
574
|
let objectExpression;
|
|
575
|
-
if (argument
|
|
575
|
+
if (Check.isIdentifier(argument)) {
|
|
576
576
|
let initNode = resolve(context, argument);
|
|
577
|
-
while (initNode != null && initNode
|
|
577
|
+
while (initNode != null && Check.isIdentifier(initNode) && !seen.has(initNode)) {
|
|
578
578
|
seen.add(initNode);
|
|
579
579
|
initNode = resolve(context, initNode);
|
|
580
580
|
}
|
|
@@ -593,7 +593,7 @@ function findSpreadProperty(context, argument, name, seen = /* @__PURE__ */ new
|
|
|
593
593
|
if (getStaticValue(key, keyScope)?.value === name) return property;
|
|
594
594
|
continue;
|
|
595
595
|
}
|
|
596
|
-
if (
|
|
596
|
+
if (Check.isIdentifier(key, name)) return property;
|
|
597
597
|
if (key.type === AST_NODE_TYPES.Literal && key.value === name) return property;
|
|
598
598
|
continue;
|
|
599
599
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/jsx",
|
|
3
|
-
"version": "5.18.
|
|
3
|
+
"version": "5.18.8",
|
|
4
4
|
"description": "ESLint React's TSESTree JSX utility module for static analysis of JSX patterns.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"
|
|
35
|
-
"@eslint-react/
|
|
36
|
-
"@eslint
|
|
37
|
-
"@eslint
|
|
38
|
-
"
|
|
32
|
+
"@eslint-react/ast": "5.18.8",
|
|
33
|
+
"@eslint-react/eslint": "5.18.8",
|
|
34
|
+
"@eslint-react/shared": "5.18.8",
|
|
35
|
+
"@eslint-react/var": "5.18.8",
|
|
36
|
+
"@typescript-eslint/types": "^8.69.0",
|
|
37
|
+
"@typescript-eslint/utils": "^8.69.0",
|
|
38
|
+
"ts-pattern": "^5.9.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"eslint": "^10.8.1",
|
|
42
|
-
"tsdown": "^0.22.14",
|
|
43
|
-
"typescript": "6.0.3",
|
|
44
41
|
"@local/configs": "0.0.0",
|
|
45
42
|
"@local/eff": "0.0.0",
|
|
46
|
-
"@local/testkit": "0.0.0"
|
|
43
|
+
"@local/testkit": "0.0.0",
|
|
44
|
+
"eslint": "^10.9.1",
|
|
45
|
+
"tsdown": "^0.22.14",
|
|
46
|
+
"typescript": "6.0.3"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"eslint": "*",
|