@eslint-react/ast 1.25.1-next.0 → 1.26.0-beta.3
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 +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -480,7 +480,7 @@ function isFunctionOfObjectMethod(node) {
|
|
|
480
480
|
return (node.type === types.AST_NODE_TYPES.FunctionExpression || node.type === types.AST_NODE_TYPES.ArrowFunctionExpression) && node.parent.type === types.AST_NODE_TYPES.Property && node.parent.parent.type === types.AST_NODE_TYPES.ObjectExpression;
|
|
481
481
|
}
|
|
482
482
|
function isKeyLiteralLike(node, property) {
|
|
483
|
-
return tsPattern.match(property).with({ type: types.AST_NODE_TYPES.Literal }, eff.
|
|
483
|
+
return tsPattern.match(property).with({ type: types.AST_NODE_TYPES.Literal }, eff.constTrue).with({ type: types.AST_NODE_TYPES.TemplateLiteral, expressions: [] }, eff.constTrue).with({ type: types.AST_NODE_TYPES.Identifier }, () => !node.computed).otherwise(eff.constFalse);
|
|
484
484
|
}
|
|
485
485
|
function isMapCallLoose(node) {
|
|
486
486
|
if (node.type !== types.AST_NODE_TYPES.CallExpression) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { or, dual, _,
|
|
1
|
+
import { or, dual, _, constTrue, constFalse } from '@eslint-react/eff';
|
|
2
2
|
import { AST_NODE_TYPES } from '@typescript-eslint/types';
|
|
3
3
|
import { ASTUtils } from '@typescript-eslint/utils';
|
|
4
4
|
import { AST_NODE_TYPES as AST_NODE_TYPES$1, simpleTraverse } from '@typescript-eslint/typescript-estree';
|
|
@@ -478,7 +478,7 @@ function isFunctionOfObjectMethod(node) {
|
|
|
478
478
|
return (node.type === AST_NODE_TYPES.FunctionExpression || node.type === AST_NODE_TYPES.ArrowFunctionExpression) && node.parent.type === AST_NODE_TYPES.Property && node.parent.parent.type === AST_NODE_TYPES.ObjectExpression;
|
|
479
479
|
}
|
|
480
480
|
function isKeyLiteralLike(node, property) {
|
|
481
|
-
return match(property).with({ type: AST_NODE_TYPES.Literal },
|
|
481
|
+
return match(property).with({ type: AST_NODE_TYPES.Literal }, constTrue).with({ type: AST_NODE_TYPES.TemplateLiteral, expressions: [] }, constTrue).with({ type: AST_NODE_TYPES.Identifier }, () => !node.computed).otherwise(constFalse);
|
|
482
482
|
}
|
|
483
483
|
function isMapCallLoose(node) {
|
|
484
484
|
if (node.type !== AST_NODE_TYPES.CallExpression) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/ast",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0-beta.3",
|
|
4
4
|
"description": "ESLint React's TSESTree AST utility module.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"./package.json"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@typescript-eslint/types": "^8.
|
|
37
|
-
"@typescript-eslint/typescript-estree": "^8.
|
|
38
|
-
"@typescript-eslint/utils": "^8.
|
|
36
|
+
"@typescript-eslint/types": "^8.22.0",
|
|
37
|
+
"@typescript-eslint/typescript-estree": "^8.22.0",
|
|
38
|
+
"@typescript-eslint/utils": "^8.22.0",
|
|
39
39
|
"string-ts": "^2.2.0",
|
|
40
40
|
"ts-pattern": "^5.6.2",
|
|
41
|
-
"@eslint-react/eff": "1.
|
|
41
|
+
"@eslint-react/eff": "1.26.0-beta.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"tsup": "^8.3.6",
|