eslint-plugin-react-debug 2.4.0-next.12 → 2.4.0-next.14
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 -8
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -41,7 +41,7 @@ const settings = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
|
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region package.json
|
|
43
43
|
var name = "eslint-plugin-react-debug";
|
|
44
|
-
var version = "2.4.0-next.
|
|
44
|
+
var version = "2.4.0-next.14";
|
|
45
45
|
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region src/utils/create-rule.ts
|
|
@@ -182,10 +182,7 @@ function create$1(context) {
|
|
|
182
182
|
}) }
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
-
return
|
|
186
|
-
Identifier: visitorFunction,
|
|
187
|
-
JSXIdentifier: visitorFunction
|
|
188
|
-
};
|
|
185
|
+
return Object.fromEntries(["Identifier", "JSXIdentifier"].map((type) => [type, visitorFunction]));
|
|
189
186
|
}
|
|
190
187
|
/**
|
|
191
188
|
* Check if an identifier node is initialized from React
|
|
@@ -197,9 +194,9 @@ function create$1(context) {
|
|
|
197
194
|
function isFromReact(node, importSource, initialScope) {
|
|
198
195
|
const name$2 = node.name;
|
|
199
196
|
switch (true) {
|
|
200
|
-
case node.parent.type === AST_NODE_TYPES.MemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.Identifier: return isInitializedFromReact(node.parent.object.name,
|
|
201
|
-
case node.parent.type === AST_NODE_TYPES.JSXMemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.JSXIdentifier: return isInitializedFromReact(node.parent.object.name,
|
|
202
|
-
default: return isInitializedFromReact(name$2,
|
|
197
|
+
case node.parent.type === AST_NODE_TYPES.MemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.Identifier: return isInitializedFromReact(node.parent.object.name, initialScope, importSource);
|
|
198
|
+
case node.parent.type === AST_NODE_TYPES.JSXMemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.JSXIdentifier: return isInitializedFromReact(node.parent.object.name, initialScope, importSource);
|
|
199
|
+
default: return isInitializedFromReact(name$2, initialScope, importSource);
|
|
203
200
|
}
|
|
204
201
|
}
|
|
205
202
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-debug",
|
|
3
|
-
"version": "2.4.0-next.
|
|
3
|
+
"version": "2.4.0-next.14",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for debugging related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -44,16 +44,16 @@
|
|
|
44
44
|
"@typescript-eslint/utils": "^8.50.0",
|
|
45
45
|
"string-ts": "^2.3.1",
|
|
46
46
|
"ts-pattern": "^5.9.0",
|
|
47
|
-
"@eslint-react/ast": "2.4.0-next.
|
|
48
|
-
"@eslint-react/
|
|
49
|
-
"@eslint-react/shared": "2.4.0-next.
|
|
50
|
-
"@eslint-react/
|
|
51
|
-
"@eslint-react/
|
|
47
|
+
"@eslint-react/ast": "2.4.0-next.14",
|
|
48
|
+
"@eslint-react/core": "2.4.0-next.14",
|
|
49
|
+
"@eslint-react/shared": "2.4.0-next.14",
|
|
50
|
+
"@eslint-react/eff": "2.4.0-next.14",
|
|
51
|
+
"@eslint-react/var": "2.4.0-next.14"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/react": "^19.2.7",
|
|
55
55
|
"@types/react-dom": "^19.2.3",
|
|
56
|
-
"tsdown": "^0.18.
|
|
56
|
+
"tsdown": "^0.18.2",
|
|
57
57
|
"@local/configs": "0.0.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|