eslint-plugin-react-hooks-extra 2.8.2-next.4 → 2.8.2-next.5

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 +6 -6
  2. package/package.json +6 -7
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ const rules = { "react-hooks-extra/no-direct-set-state-in-use-effect": "warn" };
36
36
  //#endregion
37
37
  //#region package.json
38
38
  var name = "eslint-plugin-react-hooks-extra";
39
- var version = "2.8.2-next.4";
39
+ var version = "2.8.2-next.5";
40
40
 
41
41
  //#endregion
42
42
  //#region src/utils/create-rule.ts
@@ -68,7 +68,7 @@ var no_direct_set_state_in_use_effect_default = createRule({
68
68
  meta: {
69
69
  type: "problem",
70
70
  docs: { description: "Disallows direct calls to the ['set' function](https://react.dev/reference/react/useState#setstate) of 'useState' in 'useEffect'." },
71
- messages: { noDirectSetStateInUseEffect: "Do not call the 'set' function '{{name}}' of 'useState' directly in 'useEffect'." },
71
+ messages: { default: "Do not call the 'set' function '{{name}}' of 'useState' directly in 'useEffect'." },
72
72
  schema: []
73
73
  },
74
74
  name: RULE_NAME,
@@ -173,7 +173,7 @@ function create(context) {
173
173
  case pEntry.node === setupFunction:
174
174
  case pEntry.kind === "immediate" && ast.findParentNode(pEntry.node, ast.isFunction) === setupFunction:
175
175
  context.report({
176
- messageId: "noDirectSetStateInUseEffect",
176
+ messageId: "default",
177
177
  node,
178
178
  data: { name: context.sourceCode.getText(node.callee) }
179
179
  });
@@ -226,7 +226,7 @@ function create(context) {
226
226
  return [];
227
227
  };
228
228
  for (const [, calls] of setStateInEffectSetup) for (const call of calls) context.report({
229
- messageId: "noDirectSetStateInUseEffect",
229
+ messageId: "default",
230
230
  node: call,
231
231
  data: { name: call.name }
232
232
  });
@@ -235,7 +235,7 @@ function create(context) {
235
235
  const { name } = callee;
236
236
  const setStateCalls = getSetStateCalls(name, context.sourceCode.getScope(callee));
237
237
  for (const setStateCall of setStateCalls) context.report({
238
- messageId: "noDirectSetStateInUseEffect",
238
+ messageId: "default",
239
239
  node: setStateCall,
240
240
  data: { name: getCallName(setStateCall) }
241
241
  });
@@ -243,7 +243,7 @@ function create(context) {
243
243
  for (const id of setupFnIds) {
244
244
  const setStateCalls = getSetStateCalls(id.name, context.sourceCode.getScope(id));
245
245
  for (const setStateCall of setStateCalls) context.report({
246
- messageId: "noDirectSetStateInUseEffect",
246
+ messageId: "default",
247
247
  node: setStateCall,
248
248
  data: { name: getCallName(setStateCall) }
249
249
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-hooks-extra",
3
- "version": "2.8.2-next.4",
3
+ "version": "2.8.2-next.5",
4
4
  "description": "ESLint React's ESLint plugin for React Hooks related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -43,13 +43,12 @@
43
43
  "@typescript-eslint/type-utils": "^8.54.0",
44
44
  "@typescript-eslint/types": "^8.54.0",
45
45
  "@typescript-eslint/utils": "^8.54.0",
46
- "string-ts": "^2.3.1",
47
46
  "ts-pattern": "^5.9.0",
48
- "@eslint-react/ast": "2.8.2-next.4",
49
- "@eslint-react/core": "2.8.2-next.4",
50
- "@eslint-react/shared": "2.8.2-next.4",
51
- "@eslint-react/var": "2.8.2-next.4",
52
- "@eslint-react/eff": "2.8.2-next.4"
47
+ "@eslint-react/ast": "2.8.2-next.5",
48
+ "@eslint-react/core": "2.8.2-next.5",
49
+ "@eslint-react/shared": "2.8.2-next.5",
50
+ "@eslint-react/eff": "2.8.2-next.5",
51
+ "@eslint-react/var": "2.8.2-next.5"
53
52
  },
54
53
  "devDependencies": {
55
54
  "@types/react": "^19.2.10",