eslint-plugin-react-hooks-extra 1.23.3-next.4 → 1.23.3-next.6

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
@@ -31,7 +31,7 @@ var VAR5__namespace = /*#__PURE__*/_interopNamespace(VAR5);
31
31
 
32
32
  // package.json
33
33
  var name = "eslint-plugin-react-hooks-extra";
34
- var version = "1.23.3-next.4";
34
+ var version = "1.23.3-next.6";
35
35
  var createRule = shared.createRuleForPlugin("hooks-extra");
36
36
  function isFromHookCall(name2, context, settings, predicate = eff.F.constTrue) {
37
37
  const hookAlias = settings.additionalHooks?.[name2] ?? [];
@@ -75,7 +75,7 @@ function isSetFunctionCall(context, settings) {
75
75
  }
76
76
  }, callee);
77
77
  const [index] = node.callee.arguments;
78
- if (!isAt || !index) {
78
+ if (!isAt || index == null) {
79
79
  return false;
80
80
  }
81
81
  const initialScope = context.sourceCode.getScope(node);
@@ -199,7 +199,7 @@ var no_direct_set_state_in_use_effect_default = createRule({
199
199
  return;
200
200
  }
201
201
  tsPattern.match(getCallKind(node)).with("setState", () => {
202
- if (!pEntry) {
202
+ if (pEntry == null) {
203
203
  return;
204
204
  }
205
205
  switch (true) {
@@ -416,7 +416,7 @@ var no_direct_set_state_in_use_layout_effect_default = createRule({
416
416
  return;
417
417
  }
418
418
  tsPattern.match(getCallKind(node)).with("setState", () => {
419
- if (!pEntry) {
419
+ if (pEntry == null) {
420
420
  return;
421
421
  }
422
422
  switch (true) {
@@ -592,7 +592,7 @@ var no_unnecessary_use_callback_default = createRule({
592
592
  return;
593
593
  }
594
594
  const [arg0, arg1] = node.arguments;
595
- if (!arg0 || !arg1) {
595
+ if (arg0 == null || arg1 == null) {
596
596
  return;
597
597
  }
598
598
  const hasEmptyDeps = eff.F.pipe(
@@ -673,7 +673,7 @@ var no_unnecessary_use_memo_default = createRule({
673
673
  return;
674
674
  }
675
675
  const [arg0, arg1] = node.arguments;
676
- if (!arg0 || !arg1) {
676
+ if (arg0 == null || arg1 == null) {
677
677
  return;
678
678
  }
679
679
  const hasCallInArg0 = eff.F.pipe(
@@ -806,7 +806,7 @@ var prefer_use_state_lazy_initialization_default = createRule({
806
806
  return;
807
807
  }
808
808
  const [useStateInput] = node.arguments;
809
- if (!useStateInput) {
809
+ if (useStateInput == null) {
810
810
  return;
811
811
  }
812
812
  const nestedCallExpressions = AST2__namespace.getNestedCallExpressions(useStateInput);
package/dist/index.mjs CHANGED
@@ -8,7 +8,7 @@ import { match, isMatching } from 'ts-pattern';
8
8
 
9
9
  // package.json
10
10
  var name = "eslint-plugin-react-hooks-extra";
11
- var version = "1.23.3-next.4";
11
+ var version = "1.23.3-next.6";
12
12
  var createRule = createRuleForPlugin("hooks-extra");
13
13
  function isFromHookCall(name2, context, settings, predicate = F.constTrue) {
14
14
  const hookAlias = settings.additionalHooks?.[name2] ?? [];
@@ -52,7 +52,7 @@ function isSetFunctionCall(context, settings) {
52
52
  }
53
53
  }, callee);
54
54
  const [index] = node.callee.arguments;
55
- if (!isAt || !index) {
55
+ if (!isAt || index == null) {
56
56
  return false;
57
57
  }
58
58
  const initialScope = context.sourceCode.getScope(node);
@@ -176,7 +176,7 @@ var no_direct_set_state_in_use_effect_default = createRule({
176
176
  return;
177
177
  }
178
178
  match(getCallKind(node)).with("setState", () => {
179
- if (!pEntry) {
179
+ if (pEntry == null) {
180
180
  return;
181
181
  }
182
182
  switch (true) {
@@ -393,7 +393,7 @@ var no_direct_set_state_in_use_layout_effect_default = createRule({
393
393
  return;
394
394
  }
395
395
  match(getCallKind(node)).with("setState", () => {
396
- if (!pEntry) {
396
+ if (pEntry == null) {
397
397
  return;
398
398
  }
399
399
  switch (true) {
@@ -569,7 +569,7 @@ var no_unnecessary_use_callback_default = createRule({
569
569
  return;
570
570
  }
571
571
  const [arg0, arg1] = node.arguments;
572
- if (!arg0 || !arg1) {
572
+ if (arg0 == null || arg1 == null) {
573
573
  return;
574
574
  }
575
575
  const hasEmptyDeps = F.pipe(
@@ -650,7 +650,7 @@ var no_unnecessary_use_memo_default = createRule({
650
650
  return;
651
651
  }
652
652
  const [arg0, arg1] = node.arguments;
653
- if (!arg0 || !arg1) {
653
+ if (arg0 == null || arg1 == null) {
654
654
  return;
655
655
  }
656
656
  const hasCallInArg0 = F.pipe(
@@ -783,7 +783,7 @@ var prefer_use_state_lazy_initialization_default = createRule({
783
783
  return;
784
784
  }
785
785
  const [useStateInput] = node.arguments;
786
- if (!useStateInput) {
786
+ if (useStateInput == null) {
787
787
  return;
788
788
  }
789
789
  const nestedCallExpressions = AST2.getNestedCallExpressions(useStateInput);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-hooks-extra",
3
- "version": "1.23.3-next.4",
3
+ "version": "1.23.3-next.6",
4
4
  "description": "ESLint React's ESLint plugin for React Hooks related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -48,16 +48,16 @@
48
48
  "@typescript-eslint/utils": "^8.19.1",
49
49
  "string-ts": "^2.2.0",
50
50
  "ts-pattern": "^5.6.0",
51
- "@eslint-react/core": "1.23.3-next.4",
52
- "@eslint-react/eff": "1.23.3-next.4",
53
- "@eslint-react/ast": "1.23.3-next.4",
54
- "@eslint-react/shared": "1.23.3-next.4",
55
- "@eslint-react/jsx": "1.23.3-next.4",
56
- "@eslint-react/types": "1.23.3-next.4",
57
- "@eslint-react/var": "1.23.3-next.4"
51
+ "@eslint-react/ast": "1.23.3-next.6",
52
+ "@eslint-react/core": "1.23.3-next.6",
53
+ "@eslint-react/eff": "1.23.3-next.6",
54
+ "@eslint-react/shared": "1.23.3-next.6",
55
+ "@eslint-react/types": "1.23.3-next.6",
56
+ "@eslint-react/jsx": "1.23.3-next.6",
57
+ "@eslint-react/var": "1.23.3-next.6"
58
58
  },
59
59
  "devDependencies": {
60
- "@types/react": "^19.0.3",
60
+ "@types/react": "^19.0.4",
61
61
  "@types/react-dom": "^19.0.2",
62
62
  "tsup": "^8.3.5",
63
63
  "@workspace/configs": "0.0.0"