@eslint-react/core 1.47.1 → 1.47.2-beta.0
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 +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1710,10 +1710,11 @@ function isFunctionOfUseEffectSetup(node) {
|
|
|
1710
1710
|
}
|
|
1711
1711
|
function isFunctionOfUseEffectCleanup(node) {
|
|
1712
1712
|
if (node == null) return false;
|
|
1713
|
-
const
|
|
1714
|
-
const
|
|
1715
|
-
const
|
|
1716
|
-
|
|
1713
|
+
const pReturn = AST8__namespace.findParentNode(node, AST8__namespace.is(types.AST_NODE_TYPES.ReturnStatement));
|
|
1714
|
+
const pFaunction = AST8__namespace.findParentNode(node, AST8__namespace.isFunction);
|
|
1715
|
+
const pFunctionOfReturn = AST8__namespace.findParentNode(pReturn, AST8__namespace.isFunction);
|
|
1716
|
+
if (pFaunction !== pFunctionOfReturn) return false;
|
|
1717
|
+
return isFunctionOfUseEffectSetup(pFaunction);
|
|
1717
1718
|
}
|
|
1718
1719
|
function stringifyJsx(node) {
|
|
1719
1720
|
switch (node.type) {
|
package/dist/index.mjs
CHANGED
|
@@ -1684,10 +1684,11 @@ function isFunctionOfUseEffectSetup(node) {
|
|
|
1684
1684
|
}
|
|
1685
1685
|
function isFunctionOfUseEffectCleanup(node) {
|
|
1686
1686
|
if (node == null) return false;
|
|
1687
|
-
const
|
|
1688
|
-
const
|
|
1689
|
-
const
|
|
1690
|
-
|
|
1687
|
+
const pReturn = AST8.findParentNode(node, AST8.is(AST_NODE_TYPES.ReturnStatement));
|
|
1688
|
+
const pFaunction = AST8.findParentNode(node, AST8.isFunction);
|
|
1689
|
+
const pFunctionOfReturn = AST8.findParentNode(pReturn, AST8.isFunction);
|
|
1690
|
+
if (pFaunction !== pFunctionOfReturn) return false;
|
|
1691
|
+
return isFunctionOfUseEffectSetup(pFaunction);
|
|
1691
1692
|
}
|
|
1692
1693
|
function stringifyJsx(node) {
|
|
1693
1694
|
switch (node.type) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/core",
|
|
3
|
-
"version": "1.47.
|
|
3
|
+
"version": "1.47.2-beta.0",
|
|
4
4
|
"description": "ESLint React's ESLint utility module for static analysis of React core APIs and patterns.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"@typescript-eslint/utils": "^8.29.1",
|
|
42
42
|
"birecord": "^0.1.1",
|
|
43
43
|
"ts-pattern": "^5.7.0",
|
|
44
|
-
"@eslint-react/ast": "1.47.
|
|
45
|
-
"@eslint-react/
|
|
46
|
-
"@eslint-react/
|
|
47
|
-
"@eslint-react/var": "1.47.
|
|
48
|
-
"@eslint-react/
|
|
44
|
+
"@eslint-react/ast": "1.47.2-beta.0",
|
|
45
|
+
"@eslint-react/kit": "1.47.2-beta.0",
|
|
46
|
+
"@eslint-react/shared": "1.47.2-beta.0",
|
|
47
|
+
"@eslint-react/var": "1.47.2-beta.0",
|
|
48
|
+
"@eslint-react/eff": "1.47.2-beta.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"tsup": "^8.4.0",
|