eslint-plugin-react-hooks-extra 1.5.26-beta.2 → 1.5.26-beta.3
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 +5 -3
- package/dist/index.mjs +5 -3
- 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.26-beta.
|
|
12
|
+
var version = "1.5.26-beta.3";
|
|
13
13
|
var createRule = shared.createRuleForPlugin("hooks-extra");
|
|
14
14
|
|
|
15
15
|
// src/rules/ensure-custom-hooks-using-other-hooks.ts
|
|
@@ -278,7 +278,8 @@ var ensure_use_callback_has_non_empty_deps_default = createRule({
|
|
|
278
278
|
tools.O.filter(ast.isFunction)
|
|
279
279
|
);
|
|
280
280
|
}).otherwise(tools.O.none),
|
|
281
|
-
tools.O.map((n2) => context.sourceCode.getScope(n2)
|
|
281
|
+
tools.O.map((n2) => context.sourceCode.getScope(n2)),
|
|
282
|
+
tools.O.map((s2) => [...s2.childScopes, s2].flatMap((x2) => x2.references)),
|
|
282
283
|
tools.O.exists((refs) => refs.some((x2) => x2.resolved?.scope.block === component))
|
|
283
284
|
);
|
|
284
285
|
if (isReferencedToComponentScope) return;
|
|
@@ -350,7 +351,8 @@ var ensure_use_memo_has_non_empty_deps_default = createRule({
|
|
|
350
351
|
tools.O.filter(ast.isFunction)
|
|
351
352
|
);
|
|
352
353
|
}).otherwise(tools.O.none),
|
|
353
|
-
tools.O.map((n2) => context.sourceCode.getScope(n2)
|
|
354
|
+
tools.O.map((n2) => context.sourceCode.getScope(n2)),
|
|
355
|
+
tools.O.map((s2) => [...s2.childScopes, s2].flatMap((x2) => x2.references)),
|
|
354
356
|
tools.O.exists((refs) => refs.some((x2) => x2.resolved?.scope.block === component))
|
|
355
357
|
);
|
|
356
358
|
if (isReferencedToComponentScope) return;
|
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.26-beta.
|
|
10
|
+
var version = "1.5.26-beta.3";
|
|
11
11
|
var createRule = createRuleForPlugin("hooks-extra");
|
|
12
12
|
|
|
13
13
|
// src/rules/ensure-custom-hooks-using-other-hooks.ts
|
|
@@ -276,7 +276,8 @@ var ensure_use_callback_has_non_empty_deps_default = createRule({
|
|
|
276
276
|
O.filter(isFunction)
|
|
277
277
|
);
|
|
278
278
|
}).otherwise(O.none),
|
|
279
|
-
O.map((n2) => context.sourceCode.getScope(n2)
|
|
279
|
+
O.map((n2) => context.sourceCode.getScope(n2)),
|
|
280
|
+
O.map((s2) => [...s2.childScopes, s2].flatMap((x2) => x2.references)),
|
|
280
281
|
O.exists((refs) => refs.some((x2) => x2.resolved?.scope.block === component))
|
|
281
282
|
);
|
|
282
283
|
if (isReferencedToComponentScope) return;
|
|
@@ -348,7 +349,8 @@ var ensure_use_memo_has_non_empty_deps_default = createRule({
|
|
|
348
349
|
O.filter(isFunction)
|
|
349
350
|
);
|
|
350
351
|
}).otherwise(O.none),
|
|
351
|
-
O.map((n2) => context.sourceCode.getScope(n2)
|
|
352
|
+
O.map((n2) => context.sourceCode.getScope(n2)),
|
|
353
|
+
O.map((s2) => [...s2.childScopes, s2].flatMap((x2) => x2.references)),
|
|
352
354
|
O.exists((refs) => refs.some((x2) => x2.resolved?.scope.block === component))
|
|
353
355
|
);
|
|
354
356
|
if (isReferencedToComponentScope) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-hooks-extra",
|
|
3
|
-
"version": "1.5.26-beta.
|
|
3
|
+
"version": "1.5.26-beta.3",
|
|
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.0",
|
|
40
40
|
"@typescript-eslint/types": "^7.16.0",
|
|
41
41
|
"@typescript-eslint/utils": "^7.16.0",
|
|
42
|
-
"@eslint-react/
|
|
43
|
-
"@eslint-react/jsx": "1.5.26-beta.
|
|
44
|
-
"@eslint-react/
|
|
45
|
-
"@eslint-react/
|
|
46
|
-
"@eslint-react/
|
|
47
|
-
"@eslint-react/
|
|
48
|
-
"@eslint-react/var": "1.5.26-beta.
|
|
42
|
+
"@eslint-react/core": "1.5.26-beta.3",
|
|
43
|
+
"@eslint-react/jsx": "1.5.26-beta.3",
|
|
44
|
+
"@eslint-react/tools": "1.5.26-beta.3",
|
|
45
|
+
"@eslint-react/ast": "1.5.26-beta.3",
|
|
46
|
+
"@eslint-react/types": "1.5.26-beta.3",
|
|
47
|
+
"@eslint-react/shared": "1.5.26-beta.3",
|
|
48
|
+
"@eslint-react/var": "1.5.26-beta.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"string-ts": "2.2.0",
|