eslint-plugin-react-hooks-extra 1.5.20 → 1.5.21-beta.2
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.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -9
- package/dist/index.mjs +5 -9
- package/package.json +12 -12
package/dist/index.d.mts
CHANGED
|
@@ -5,10 +5,10 @@ declare const meta: {
|
|
|
5
5
|
readonly version: string;
|
|
6
6
|
};
|
|
7
7
|
declare const rules: {
|
|
8
|
-
readonly "ensure-custom-hooks-using-other-hooks": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_CUSTOM_HOOKS_USING_OTHER_HOOKS", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
9
|
-
readonly "ensure-use-callback-has-non-empty-deps": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
10
|
-
readonly "ensure-use-memo-has-non-empty-deps": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
11
|
-
readonly "prefer-use-state-lazy-initialization": _typescript_eslint_utils_ts_eslint.RuleModule<"PREFER_USE_STATE_LAZY_INITIALIZATION", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
8
|
+
readonly "ensure-custom-hooks-using-other-hooks": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_CUSTOM_HOOKS_USING_OTHER_HOOKS", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
9
|
+
readonly "ensure-use-callback-has-non-empty-deps": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
10
|
+
readonly "ensure-use-memo-has-non-empty-deps": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
11
|
+
readonly "prefer-use-state-lazy-initialization": _typescript_eslint_utils_ts_eslint.RuleModule<"PREFER_USE_STATE_LAZY_INITIALIZATION", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export { meta, rules };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,10 +5,10 @@ declare const meta: {
|
|
|
5
5
|
readonly version: string;
|
|
6
6
|
};
|
|
7
7
|
declare const rules: {
|
|
8
|
-
readonly "ensure-custom-hooks-using-other-hooks": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_CUSTOM_HOOKS_USING_OTHER_HOOKS", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
9
|
-
readonly "ensure-use-callback-has-non-empty-deps": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
10
|
-
readonly "ensure-use-memo-has-non-empty-deps": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
11
|
-
readonly "prefer-use-state-lazy-initialization": _typescript_eslint_utils_ts_eslint.RuleModule<"PREFER_USE_STATE_LAZY_INITIALIZATION", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
8
|
+
readonly "ensure-custom-hooks-using-other-hooks": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_CUSTOM_HOOKS_USING_OTHER_HOOKS", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
9
|
+
readonly "ensure-use-callback-has-non-empty-deps": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
10
|
+
readonly "ensure-use-memo-has-non-empty-deps": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
11
|
+
readonly "prefer-use-state-lazy-initialization": _typescript_eslint_utils_ts_eslint.RuleModule<"PREFER_USE_STATE_LAZY_INITIALIZATION", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export { meta, rules };
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var __export = (target, all2) => {
|
|
|
13
13
|
|
|
14
14
|
// package.json
|
|
15
15
|
var name = "eslint-plugin-react-hooks-extra";
|
|
16
|
-
var version = "1.5.
|
|
16
|
+
var version = "1.5.21-beta.2";
|
|
17
17
|
var createRule = shared.createRuleForPlugin("hooks-extra");
|
|
18
18
|
|
|
19
19
|
// src/rules/ensure-custom-hooks-using-other-hooks.ts
|
|
@@ -22,8 +22,7 @@ var ensure_custom_hooks_using_other_hooks_default = createRule({
|
|
|
22
22
|
meta: {
|
|
23
23
|
type: "problem",
|
|
24
24
|
docs: {
|
|
25
|
-
description: "enforce custom hooks using other hooks"
|
|
26
|
-
requiresTypeChecking: false
|
|
25
|
+
description: "enforce custom hooks using other hooks"
|
|
27
26
|
},
|
|
28
27
|
messages: {
|
|
29
28
|
ENSURE_CUSTOM_HOOKS_USING_OTHER_HOOKS: "A custom hook '{{name}}' should use other hooks"
|
|
@@ -1167,8 +1166,7 @@ var ensure_use_callback_has_non_empty_deps_default = createRule({
|
|
|
1167
1166
|
meta: {
|
|
1168
1167
|
type: "problem",
|
|
1169
1168
|
docs: {
|
|
1170
|
-
description: "enforce 'useCallback' has non-empty dependencies array"
|
|
1171
|
-
requiresTypeChecking: false
|
|
1169
|
+
description: "enforce 'useCallback' has non-empty dependencies array"
|
|
1172
1170
|
},
|
|
1173
1171
|
messages: {
|
|
1174
1172
|
ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS: "An useCallback should have a non-empty dependencies array"
|
|
@@ -1218,8 +1216,7 @@ var ensure_use_memo_has_non_empty_deps_default = createRule({
|
|
|
1218
1216
|
meta: {
|
|
1219
1217
|
type: "problem",
|
|
1220
1218
|
docs: {
|
|
1221
|
-
description: "enforce 'useMemo' has non-empty dependencies array"
|
|
1222
|
-
requiresTypeChecking: false
|
|
1219
|
+
description: "enforce 'useMemo' has non-empty dependencies array"
|
|
1223
1220
|
},
|
|
1224
1221
|
messages: {
|
|
1225
1222
|
ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS: "An useMemo should have a non-empty dependencies array"
|
|
@@ -1268,8 +1265,7 @@ var prefer_use_state_lazy_initialization_default = createRule({
|
|
|
1268
1265
|
meta: {
|
|
1269
1266
|
type: "problem",
|
|
1270
1267
|
docs: {
|
|
1271
|
-
description: "disallow function calls in 'useState' that aren't wrapped in an initializer function"
|
|
1272
|
-
requiresTypeChecking: false
|
|
1268
|
+
description: "disallow function calls in 'useState' that aren't wrapped in an initializer function"
|
|
1273
1269
|
},
|
|
1274
1270
|
messages: {
|
|
1275
1271
|
PREFER_USE_STATE_LAZY_INITIALIZATION: "To prevent re-computation, consider using lazy initial state for useState calls that involve function calls. Ex: 'useState(() => getValue())'"
|
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ var __export = (target, all2) => {
|
|
|
11
11
|
|
|
12
12
|
// package.json
|
|
13
13
|
var name = "eslint-plugin-react-hooks-extra";
|
|
14
|
-
var version = "1.5.
|
|
14
|
+
var version = "1.5.21-beta.2";
|
|
15
15
|
var createRule = createRuleForPlugin("hooks-extra");
|
|
16
16
|
|
|
17
17
|
// src/rules/ensure-custom-hooks-using-other-hooks.ts
|
|
@@ -20,8 +20,7 @@ var ensure_custom_hooks_using_other_hooks_default = createRule({
|
|
|
20
20
|
meta: {
|
|
21
21
|
type: "problem",
|
|
22
22
|
docs: {
|
|
23
|
-
description: "enforce custom hooks using other hooks"
|
|
24
|
-
requiresTypeChecking: false
|
|
23
|
+
description: "enforce custom hooks using other hooks"
|
|
25
24
|
},
|
|
26
25
|
messages: {
|
|
27
26
|
ENSURE_CUSTOM_HOOKS_USING_OTHER_HOOKS: "A custom hook '{{name}}' should use other hooks"
|
|
@@ -1165,8 +1164,7 @@ var ensure_use_callback_has_non_empty_deps_default = createRule({
|
|
|
1165
1164
|
meta: {
|
|
1166
1165
|
type: "problem",
|
|
1167
1166
|
docs: {
|
|
1168
|
-
description: "enforce 'useCallback' has non-empty dependencies array"
|
|
1169
|
-
requiresTypeChecking: false
|
|
1167
|
+
description: "enforce 'useCallback' has non-empty dependencies array"
|
|
1170
1168
|
},
|
|
1171
1169
|
messages: {
|
|
1172
1170
|
ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS: "An useCallback should have a non-empty dependencies array"
|
|
@@ -1216,8 +1214,7 @@ var ensure_use_memo_has_non_empty_deps_default = createRule({
|
|
|
1216
1214
|
meta: {
|
|
1217
1215
|
type: "problem",
|
|
1218
1216
|
docs: {
|
|
1219
|
-
description: "enforce 'useMemo' has non-empty dependencies array"
|
|
1220
|
-
requiresTypeChecking: false
|
|
1217
|
+
description: "enforce 'useMemo' has non-empty dependencies array"
|
|
1221
1218
|
},
|
|
1222
1219
|
messages: {
|
|
1223
1220
|
ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS: "An useMemo should have a non-empty dependencies array"
|
|
@@ -1266,8 +1263,7 @@ var prefer_use_state_lazy_initialization_default = createRule({
|
|
|
1266
1263
|
meta: {
|
|
1267
1264
|
type: "problem",
|
|
1268
1265
|
docs: {
|
|
1269
|
-
description: "disallow function calls in 'useState' that aren't wrapped in an initializer function"
|
|
1270
|
-
requiresTypeChecking: false
|
|
1266
|
+
description: "disallow function calls in 'useState' that aren't wrapped in an initializer function"
|
|
1271
1267
|
},
|
|
1272
1268
|
messages: {
|
|
1273
1269
|
PREFER_USE_STATE_LAZY_INITIALIZATION: "To prevent re-computation, consider using lazy initial state for useState calls that involve function calls. Ex: 'useState(() => getValue())'"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-hooks-extra",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.21-beta.2",
|
|
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": {
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"./package.json"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@typescript-eslint/scope-manager": "
|
|
39
|
-
"@typescript-eslint/type-utils": "
|
|
40
|
-
"@typescript-eslint/types": "
|
|
41
|
-
"@typescript-eslint/utils": "
|
|
42
|
-
"@eslint-react/
|
|
43
|
-
"@eslint-react/
|
|
44
|
-
"@eslint-react/
|
|
45
|
-
"@eslint-react/
|
|
46
|
-
"@eslint-react/
|
|
47
|
-
"@eslint-react/
|
|
48
|
-
"@eslint-react/
|
|
38
|
+
"@typescript-eslint/scope-manager": "8.0.0-alpha.40",
|
|
39
|
+
"@typescript-eslint/type-utils": "8.0.0-alpha.40",
|
|
40
|
+
"@typescript-eslint/types": "8.0.0-alpha.40",
|
|
41
|
+
"@typescript-eslint/utils": "8.0.0-alpha.40",
|
|
42
|
+
"@eslint-react/core": "1.5.21-beta.2",
|
|
43
|
+
"@eslint-react/ast": "1.5.21-beta.2",
|
|
44
|
+
"@eslint-react/shared": "1.5.21-beta.2",
|
|
45
|
+
"@eslint-react/jsx": "1.5.21-beta.2",
|
|
46
|
+
"@eslint-react/types": "1.5.21-beta.2",
|
|
47
|
+
"@eslint-react/var": "1.5.21-beta.2",
|
|
48
|
+
"@eslint-react/tools": "1.5.21-beta.2"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"dedent": "1.5.3",
|