eslint-plugin-react-hooks-extra 1.5.28-beta.6 → 1.5.28-beta.7
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 +3 -9
- package/dist/index.mjs +3 -9
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var astUtils = require('@typescript-eslint/utils/ast-utils');
|
|
|
9
9
|
|
|
10
10
|
// package.json
|
|
11
11
|
var name = "eslint-plugin-react-hooks-extra";
|
|
12
|
-
var version = "1.5.28-beta.
|
|
12
|
+
var version = "1.5.28-beta.7";
|
|
13
13
|
var createRule = shared.createRuleForPlugin("hooks-extra");
|
|
14
14
|
|
|
15
15
|
// src/rules/ensure-custom-hooks-using-other-hooks.ts
|
|
@@ -483,10 +483,7 @@ var no_direct_set_state_in_use_effect_default = createRule({
|
|
|
483
483
|
}).otherwise(tools.F.constVoid);
|
|
484
484
|
},
|
|
485
485
|
":function:exit"(node) {
|
|
486
|
-
|
|
487
|
-
if (effectFn === node) {
|
|
488
|
-
tools.MutRef.set(effectFunctionRef, null);
|
|
489
|
-
}
|
|
486
|
+
tools.MutRef.update(effectFunctionRef, (current) => current === node ? null : current);
|
|
490
487
|
tools.MutList.pop(functionStack);
|
|
491
488
|
},
|
|
492
489
|
CallExpression(node) {
|
|
@@ -640,10 +637,7 @@ var no_direct_set_state_in_use_layout_effect_default = createRule({
|
|
|
640
637
|
}).otherwise(tools.F.constVoid);
|
|
641
638
|
},
|
|
642
639
|
":function:exit"(node) {
|
|
643
|
-
|
|
644
|
-
if (effectFn === node) {
|
|
645
|
-
tools.MutRef.set(effectFunctionRef, null);
|
|
646
|
-
}
|
|
640
|
+
tools.MutRef.update(effectFunctionRef, (current) => current === node ? null : current);
|
|
647
641
|
tools.MutList.pop(functionStack);
|
|
648
642
|
},
|
|
649
643
|
CallExpression(node) {
|
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { getStaticValue } from '@typescript-eslint/utils/ast-utils';
|
|
|
7
7
|
|
|
8
8
|
// package.json
|
|
9
9
|
var name = "eslint-plugin-react-hooks-extra";
|
|
10
|
-
var version = "1.5.28-beta.
|
|
10
|
+
var version = "1.5.28-beta.7";
|
|
11
11
|
var createRule = createRuleForPlugin("hooks-extra");
|
|
12
12
|
|
|
13
13
|
// src/rules/ensure-custom-hooks-using-other-hooks.ts
|
|
@@ -481,10 +481,7 @@ var no_direct_set_state_in_use_effect_default = createRule({
|
|
|
481
481
|
}).otherwise(F.constVoid);
|
|
482
482
|
},
|
|
483
483
|
":function:exit"(node) {
|
|
484
|
-
|
|
485
|
-
if (effectFn === node) {
|
|
486
|
-
MutRef.set(effectFunctionRef, null);
|
|
487
|
-
}
|
|
484
|
+
MutRef.update(effectFunctionRef, (current) => current === node ? null : current);
|
|
488
485
|
MutList.pop(functionStack);
|
|
489
486
|
},
|
|
490
487
|
CallExpression(node) {
|
|
@@ -638,10 +635,7 @@ var no_direct_set_state_in_use_layout_effect_default = createRule({
|
|
|
638
635
|
}).otherwise(F.constVoid);
|
|
639
636
|
},
|
|
640
637
|
":function:exit"(node) {
|
|
641
|
-
|
|
642
|
-
if (effectFn === node) {
|
|
643
|
-
MutRef.set(effectFunctionRef, null);
|
|
644
|
-
}
|
|
638
|
+
MutRef.update(effectFunctionRef, (current) => current === node ? null : current);
|
|
645
639
|
MutList.pop(functionStack);
|
|
646
640
|
},
|
|
647
641
|
CallExpression(node) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-hooks-extra",
|
|
3
|
-
"version": "1.5.28-beta.
|
|
3
|
+
"version": "1.5.28-beta.7",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for React Hooks related rules.",
|
|
5
5
|
"homepage": "https://github.com/rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"@typescript-eslint/type-utils": "^7.16.1",
|
|
40
40
|
"@typescript-eslint/types": "^7.16.1",
|
|
41
41
|
"@typescript-eslint/utils": "^7.16.1",
|
|
42
|
-
"@eslint-react/ast": "1.5.28-beta.
|
|
43
|
-
"@eslint-react/
|
|
44
|
-
"@eslint-react/
|
|
45
|
-
"@eslint-react/
|
|
46
|
-
"@eslint-react/
|
|
47
|
-
"@eslint-react/
|
|
48
|
-
"@eslint-react/var": "1.5.28-beta.
|
|
42
|
+
"@eslint-react/ast": "1.5.28-beta.7",
|
|
43
|
+
"@eslint-react/core": "1.5.28-beta.7",
|
|
44
|
+
"@eslint-react/jsx": "1.5.28-beta.7",
|
|
45
|
+
"@eslint-react/shared": "1.5.28-beta.7",
|
|
46
|
+
"@eslint-react/tools": "1.5.28-beta.7",
|
|
47
|
+
"@eslint-react/types": "1.5.28-beta.7",
|
|
48
|
+
"@eslint-react/var": "1.5.28-beta.7"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"string-ts": "2.2.0",
|