eslint-plugin-react-hooks-extra 1.11.0-next.9 → 1.11.0
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 -3
- package/dist/index.mjs +3 -3
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ var tsPattern = require('ts-pattern');
|
|
|
11
11
|
|
|
12
12
|
// package.json
|
|
13
13
|
var name = "eslint-plugin-react-hooks-extra";
|
|
14
|
-
var version = "1.11.0
|
|
14
|
+
var version = "1.11.0";
|
|
15
15
|
var createRule = shared.createRuleForPlugin("hooks-extra");
|
|
16
16
|
function isFromHookCall(name2, context, settings, predicate = tools.F.constTrue) {
|
|
17
17
|
const hookAlias = settings.additionalHooks?.[name2] ?? [];
|
|
@@ -300,7 +300,7 @@ var no_direct_set_state_in_use_effect_default = createRule({
|
|
|
300
300
|
},
|
|
301
301
|
name: RULE_NAME4,
|
|
302
302
|
create(context) {
|
|
303
|
-
if (
|
|
303
|
+
if (!/use\w*Effect/u.test(context.sourceCode.text)) return {};
|
|
304
304
|
const settings = shared.decodeSettings(context.settings);
|
|
305
305
|
const additionalHooks = settings.additionalHooks ?? {};
|
|
306
306
|
const isUseEffectCall = core.isReactHookCallWithNameAlias("useEffect", context, additionalHooks.useEffect ?? []);
|
|
@@ -476,7 +476,7 @@ var no_direct_set_state_in_use_layout_effect_default = createRule({
|
|
|
476
476
|
},
|
|
477
477
|
name: RULE_NAME5,
|
|
478
478
|
create(context) {
|
|
479
|
-
if (
|
|
479
|
+
if (!/use\w*Effect/u.test(context.sourceCode.text)) return {};
|
|
480
480
|
const settings = shared.decodeSettings(context.settings);
|
|
481
481
|
const additionalHooks = settings.additionalHooks ?? {};
|
|
482
482
|
const isUseEffectCall = core.isReactHookCallWithNameAlias(
|
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { match, isMatching } from 'ts-pattern';
|
|
|
9
9
|
|
|
10
10
|
// package.json
|
|
11
11
|
var name = "eslint-plugin-react-hooks-extra";
|
|
12
|
-
var version = "1.11.0
|
|
12
|
+
var version = "1.11.0";
|
|
13
13
|
var createRule = createRuleForPlugin("hooks-extra");
|
|
14
14
|
function isFromHookCall(name2, context, settings, predicate = F.constTrue) {
|
|
15
15
|
const hookAlias = settings.additionalHooks?.[name2] ?? [];
|
|
@@ -298,7 +298,7 @@ var no_direct_set_state_in_use_effect_default = createRule({
|
|
|
298
298
|
},
|
|
299
299
|
name: RULE_NAME4,
|
|
300
300
|
create(context) {
|
|
301
|
-
if (
|
|
301
|
+
if (!/use\w*Effect/u.test(context.sourceCode.text)) return {};
|
|
302
302
|
const settings = decodeSettings(context.settings);
|
|
303
303
|
const additionalHooks = settings.additionalHooks ?? {};
|
|
304
304
|
const isUseEffectCall = isReactHookCallWithNameAlias("useEffect", context, additionalHooks.useEffect ?? []);
|
|
@@ -474,7 +474,7 @@ var no_direct_set_state_in_use_layout_effect_default = createRule({
|
|
|
474
474
|
},
|
|
475
475
|
name: RULE_NAME5,
|
|
476
476
|
create(context) {
|
|
477
|
-
if (
|
|
477
|
+
if (!/use\w*Effect/u.test(context.sourceCode.text)) return {};
|
|
478
478
|
const settings = decodeSettings(context.settings);
|
|
479
479
|
const additionalHooks = settings.additionalHooks ?? {};
|
|
480
480
|
const isUseEffectCall = isReactHookCallWithNameAlias(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-hooks-extra",
|
|
3
|
-
"version": "1.11.0
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for React Hooks related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
"@typescript-eslint/types": "^8.2.0",
|
|
47
47
|
"@typescript-eslint/utils": "^8.2.0",
|
|
48
48
|
"ts-pattern": "^5.3.1",
|
|
49
|
-
"@eslint-react/
|
|
50
|
-
"@eslint-react/core": "1.11.0
|
|
51
|
-
"@eslint-react/
|
|
52
|
-
"@eslint-react/
|
|
53
|
-
"@eslint-react/
|
|
54
|
-
"@eslint-react/
|
|
55
|
-
"@eslint-react/var": "1.11.0
|
|
49
|
+
"@eslint-react/ast": "1.11.0",
|
|
50
|
+
"@eslint-react/core": "1.11.0",
|
|
51
|
+
"@eslint-react/jsx": "1.11.0",
|
|
52
|
+
"@eslint-react/shared": "1.11.0",
|
|
53
|
+
"@eslint-react/tools": "1.11.0",
|
|
54
|
+
"@eslint-react/types": "1.11.0",
|
|
55
|
+
"@eslint-react/var": "1.11.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/react": "^18.3.3",
|