eslint-plugin-react-debug 1.24.0-next.13 → 1.24.0-next.15

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 CHANGED
@@ -6,7 +6,7 @@ var utils = require('@typescript-eslint/utils');
6
6
 
7
7
  // package.json
8
8
  var name = "eslint-plugin-react-debug";
9
- var version = "1.24.0-next.13";
9
+ var version = "1.24.0-next.15";
10
10
  var createRule = shared.createRuleForPlugin("debug");
11
11
 
12
12
  // src/rules/class-component.ts
@@ -155,20 +155,16 @@ var is_from_react_default = createRule({
155
155
  },
156
156
  name: RULE_NAME4,
157
157
  create(context) {
158
- const settings = {
159
- importSource: "react",
160
- ...shared.getSettingsFromContext(context),
161
- strictImportCheck: true
162
- };
158
+ const { importSource = "react" } = shared.getSettingsFromContext(context);
163
159
  function isFromReact(node, initialScope) {
164
160
  const name2 = node.name;
165
161
  switch (true) {
166
162
  case (node.parent.type === utils.AST_NODE_TYPES.MemberExpression && node.parent.property === node && node.parent.object.type === utils.AST_NODE_TYPES.Identifier):
167
- return core.isInitializedFromReact(node.parent.object.name, initialScope, settings.importSource);
163
+ return core.isInitializedFromReact(node.parent.object.name, importSource, initialScope);
168
164
  case (node.parent.type === utils.AST_NODE_TYPES.JSXMemberExpression && node.parent.property === node && node.parent.object.type === utils.AST_NODE_TYPES.JSXIdentifier):
169
- return core.isInitializedFromReact(node.parent.object.name, initialScope, settings.importSource);
165
+ return core.isInitializedFromReact(node.parent.object.name, importSource, initialScope);
170
166
  default:
171
- return core.isInitializedFromReact(name2, initialScope, settings.importSource);
167
+ return core.isInitializedFromReact(name2, importSource, initialScope);
172
168
  }
173
169
  }
174
170
  function visitorFunction(node) {
@@ -188,7 +184,7 @@ var is_from_react_default = createRule({
188
184
  // eslint-disable-next-line eslint-plugin/no-unused-placeholders
189
185
  type: node.type,
190
186
  name: name2,
191
- importSource: settings.importSource
187
+ importSource
192
188
  }
193
189
  });
194
190
  }
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ import { AST_NODE_TYPES } from '@typescript-eslint/utils';
4
4
 
5
5
  // package.json
6
6
  var name = "eslint-plugin-react-debug";
7
- var version = "1.24.0-next.13";
7
+ var version = "1.24.0-next.15";
8
8
  var createRule = createRuleForPlugin("debug");
9
9
 
10
10
  // src/rules/class-component.ts
@@ -153,20 +153,16 @@ var is_from_react_default = createRule({
153
153
  },
154
154
  name: RULE_NAME4,
155
155
  create(context) {
156
- const settings = {
157
- importSource: "react",
158
- ...getSettingsFromContext(context),
159
- strictImportCheck: true
160
- };
156
+ const { importSource = "react" } = getSettingsFromContext(context);
161
157
  function isFromReact(node, initialScope) {
162
158
  const name2 = node.name;
163
159
  switch (true) {
164
160
  case (node.parent.type === AST_NODE_TYPES.MemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.Identifier):
165
- return isInitializedFromReact(node.parent.object.name, initialScope, settings.importSource);
161
+ return isInitializedFromReact(node.parent.object.name, importSource, initialScope);
166
162
  case (node.parent.type === AST_NODE_TYPES.JSXMemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.JSXIdentifier):
167
- return isInitializedFromReact(node.parent.object.name, initialScope, settings.importSource);
163
+ return isInitializedFromReact(node.parent.object.name, importSource, initialScope);
168
164
  default:
169
- return isInitializedFromReact(name2, initialScope, settings.importSource);
165
+ return isInitializedFromReact(name2, importSource, initialScope);
170
166
  }
171
167
  }
172
168
  function visitorFunction(node) {
@@ -186,7 +182,7 @@ var is_from_react_default = createRule({
186
182
  // eslint-disable-next-line eslint-plugin/no-unused-placeholders
187
183
  type: node.type,
188
184
  name: name2,
189
- importSource: settings.importSource
185
+ importSource
190
186
  }
191
187
  });
192
188
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-debug",
3
- "version": "1.24.0-next.13",
3
+ "version": "1.24.0-next.15",
4
4
  "description": "ESLint React's ESLint plugin for debugging related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -47,12 +47,12 @@
47
47
  "@typescript-eslint/utils": "^8.20.0",
48
48
  "string-ts": "^2.2.0",
49
49
  "ts-pattern": "^5.6.0",
50
- "@eslint-react/ast": "1.24.0-next.13",
51
- "@eslint-react/jsx": "1.24.0-next.13",
52
- "@eslint-react/eff": "1.24.0-next.13",
53
- "@eslint-react/shared": "1.24.0-next.13",
54
- "@eslint-react/var": "1.24.0-next.13",
55
- "@eslint-react/core": "1.24.0-next.13"
50
+ "@eslint-react/ast": "1.24.0-next.15",
51
+ "@eslint-react/eff": "1.24.0-next.15",
52
+ "@eslint-react/shared": "1.24.0-next.15",
53
+ "@eslint-react/core": "1.24.0-next.15",
54
+ "@eslint-react/var": "1.24.0-next.15",
55
+ "@eslint-react/jsx": "1.24.0-next.15"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/react": "^19.0.7",