eslint-plugin-react-debug 2.0.0-next.14 → 2.0.0-next.141

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 +13 -13
  2. package/package.json +16 -17
package/dist/index.js CHANGED
@@ -33,7 +33,7 @@ var settings = {
33
33
 
34
34
  // package.json
35
35
  var name2 = "eslint-plugin-react-debug";
36
- var version = "2.0.0-next.14";
36
+ var version = "2.0.0-next.141";
37
37
  var createRule = ESLintUtils.RuleCreator(getDocsUrl("debug"));
38
38
 
39
39
  // src/utils/stringify.ts
@@ -195,23 +195,12 @@ var is_from_react_default = createRule({
195
195
  });
196
196
  function create4(context) {
197
197
  const { importSource = "react" } = getSettingsFromContext(context);
198
- function isFromReact(node, initialScope) {
199
- const name3 = node.name;
200
- switch (true) {
201
- case (node.parent.type === AST_NODE_TYPES.MemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.Identifier):
202
- return ER2.isInitializedFromReact(node.parent.object.name, importSource, initialScope);
203
- case (node.parent.type === AST_NODE_TYPES.JSXMemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.JSXIdentifier):
204
- return ER2.isInitializedFromReact(node.parent.object.name, importSource, initialScope);
205
- default:
206
- return ER2.isInitializedFromReact(name3, importSource, initialScope);
207
- }
208
- }
209
198
  function visitorFunction(node) {
210
199
  const shouldSkipDuplicate = node.parent.type === AST_NODE_TYPES.ImportSpecifier && node.parent.imported === node && node.parent.imported.name === node.parent.local.name;
211
200
  if (shouldSkipDuplicate) return;
212
201
  const name3 = node.name;
213
202
  const initialScope = context.sourceCode.getScope(node);
214
- if (!isFromReact(node, initialScope)) return;
203
+ if (!isFromReact(node, importSource, initialScope)) return;
215
204
  context.report({
216
205
  messageId: "isFromReact",
217
206
  node,
@@ -228,6 +217,17 @@ function create4(context) {
228
217
  JSXIdentifier: visitorFunction
229
218
  };
230
219
  }
220
+ function isFromReact(node, importSource, initialScope) {
221
+ const name3 = node.name;
222
+ switch (true) {
223
+ case (node.parent.type === AST_NODE_TYPES.MemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.Identifier):
224
+ return ER2.isInitializedFromReact(node.parent.object.name, importSource, initialScope);
225
+ case (node.parent.type === AST_NODE_TYPES.JSXMemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.JSXIdentifier):
226
+ return ER2.isInitializedFromReact(node.parent.object.name, importSource, initialScope);
227
+ default:
228
+ return ER2.isInitializedFromReact(name3, importSource, initialScope);
229
+ }
230
+ }
231
231
  var { JsxEmit } = JsxConfig;
232
232
  var RULE_NAME5 = "jsx";
233
233
  var RULE_FEATURES5 = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-debug",
3
- "version": "2.0.0-next.14",
3
+ "version": "2.0.0-next.141",
4
4
  "description": "ESLint React's ESLint plugin for debugging related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -35,27 +35,27 @@
35
35
  "./package.json"
36
36
  ],
37
37
  "dependencies": {
38
- "@typescript-eslint/scope-manager": "^8.31.1",
39
- "@typescript-eslint/type-utils": "^8.31.1",
40
- "@typescript-eslint/types": "^8.31.1",
41
- "@typescript-eslint/utils": "^8.31.1",
38
+ "@typescript-eslint/scope-manager": "^8.40.0",
39
+ "@typescript-eslint/type-utils": "^8.40.0",
40
+ "@typescript-eslint/types": "^8.40.0",
41
+ "@typescript-eslint/utils": "^8.40.0",
42
42
  "string-ts": "^2.2.1",
43
- "ts-pattern": "^5.7.0",
44
- "@eslint-react/ast": "2.0.0-next.14",
45
- "@eslint-react/core": "2.0.0-next.14",
46
- "@eslint-react/eff": "2.0.0-next.14",
47
- "@eslint-react/kit": "2.0.0-next.14",
48
- "@eslint-react/shared": "2.0.0-next.14",
49
- "@eslint-react/var": "2.0.0-next.14"
43
+ "ts-pattern": "^5.8.0",
44
+ "@eslint-react/ast": "2.0.0-next.141",
45
+ "@eslint-react/kit": "2.0.0-next.141",
46
+ "@eslint-react/core": "2.0.0-next.141",
47
+ "@eslint-react/shared": "2.0.0-next.141",
48
+ "@eslint-react/eff": "2.0.0-next.141",
49
+ "@eslint-react/var": "2.0.0-next.141"
50
50
  },
51
51
  "devDependencies": {
52
- "@types/react": "^19.1.2",
53
- "@types/react-dom": "^19.1.3",
54
- "tsup": "^8.4.0",
52
+ "@types/react": "^19.1.11",
53
+ "@types/react-dom": "^19.1.7",
54
+ "tsup": "^8.5.0",
55
55
  "@local/configs": "0.0.0"
56
56
  },
57
57
  "peerDependencies": {
58
- "eslint": "^9.26.0",
58
+ "eslint": "^9.33.0",
59
59
  "typescript": "^4.9.5 || ^5.4.5"
60
60
  },
61
61
  "peerDependenciesMeta": {
@@ -67,7 +67,6 @@
67
67
  }
68
68
  },
69
69
  "engines": {
70
- "bun": ">=1.0.15",
71
70
  "node": ">=20.19.0"
72
71
  },
73
72
  "publishConfig": {