@eslint-react/jsx 5.30.0-beta.16 → 5.30.0-beta.18

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -267,8 +267,13 @@ function parseCreateElementCall(context, node) {
267
267
  };
268
268
  }
269
269
  function getStaticPropertyName(context, property) {
270
- if (!property.computed) return Extract.getPropertyName(property, "max");
271
270
  const key = Extract.unwrap(property.key);
271
+ if (!property.computed) {
272
+ if (Check.isIdentifier(key)) return key.name;
273
+ if (key.type === AST_NODE_TYPES.Literal && typeof key.value === "string") return key.value;
274
+ if (key.type === AST_NODE_TYPES.TemplateLiteral && key.expressions.length === 0) return key.quasis[0]?.value.cooked ?? key.quasis[0]?.value.raw ?? null;
275
+ return null;
276
+ }
272
277
  const staticValue = getStaticValue(key, context.sourceCode.getScope(key));
273
278
  return typeof staticValue?.value === "string" ? staticValue.value : null;
274
279
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/jsx",
3
- "version": "5.30.0-beta.16",
3
+ "version": "5.30.0-beta.18",
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,8 +29,8 @@
29
29
  "dist"
30
30
  ],
31
31
  "dependencies": {
32
- "@eslint-react/ast": "5.30.0-beta.16",
33
- "@eslint-react/eslint": "5.30.0-beta.16",
32
+ "@eslint-react/ast": "5.30.0-beta.18",
33
+ "@eslint-react/eslint": "5.30.0-beta.18",
34
34
  "@typescript-eslint/types": "^8.72.1",
35
35
  "@typescript-eslint/utils": "^8.72.1"
36
36
  },
@@ -40,7 +40,7 @@
40
40
  "@local/testkit": "0.0.0",
41
41
  "@tsconfig/node20": "^20.1.10",
42
42
  "@types/node": "^20.19.43",
43
- "eslint": "^10.13.0",
43
+ "eslint": "^10.14.0",
44
44
  "tsdown": "^0.23.4",
45
45
  "typescript": "6.0.3"
46
46
  },