@eslint-react/jsx 5.30.0-beta.16 → 5.30.0-beta.17
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 +6 -1
- package/package.json +3 -3
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.
|
|
3
|
+
"version": "5.30.0-beta.17",
|
|
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.
|
|
33
|
-
"@eslint-react/eslint": "5.30.0-beta.
|
|
32
|
+
"@eslint-react/ast": "5.30.0-beta.17",
|
|
33
|
+
"@eslint-react/eslint": "5.30.0-beta.17",
|
|
34
34
|
"@typescript-eslint/types": "^8.72.1",
|
|
35
35
|
"@typescript-eslint/utils": "^8.72.1"
|
|
36
36
|
},
|