eslint-plugin-react-hooks-extra 1.5.2 → 1.5.3-beta.1
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.cjs +7 -7
- package/dist/index.js +7 -7
- package/dist/index.mjs +7 -7
- package/package.json +13 -13
package/dist/index.cjs
CHANGED
|
@@ -7,7 +7,7 @@ var jsx = require('@eslint-react/jsx');
|
|
|
7
7
|
var _var = require('@eslint-react/var');
|
|
8
8
|
|
|
9
9
|
var name = "eslint-plugin-react-hooks-extra";
|
|
10
|
-
var version = "1.5.
|
|
10
|
+
var version = "1.5.3-beta.1";
|
|
11
11
|
|
|
12
12
|
const createRule = shared.createRuleForPlugin("hooks-extra");
|
|
13
13
|
|
|
@@ -883,12 +883,12 @@ var ensureUseCallbackHasNonEmptyDeps = createRule({
|
|
|
883
883
|
meta: {
|
|
884
884
|
type: "problem",
|
|
885
885
|
docs: {
|
|
886
|
-
description: "enforce
|
|
886
|
+
description: "enforce 'useCallback' has non-empty dependencies array",
|
|
887
887
|
requiresTypeChecking: false
|
|
888
888
|
},
|
|
889
889
|
schema: [],
|
|
890
890
|
messages: {
|
|
891
|
-
ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS: "
|
|
891
|
+
ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS: "useCallback should have a non-empty dependencies array"
|
|
892
892
|
}
|
|
893
893
|
},
|
|
894
894
|
defaultOptions: [],
|
|
@@ -932,12 +932,12 @@ var ensureUseMemoHasNonEmptyDeps = createRule({
|
|
|
932
932
|
meta: {
|
|
933
933
|
type: "problem",
|
|
934
934
|
docs: {
|
|
935
|
-
description: "enforce
|
|
935
|
+
description: "enforce 'useMemo' has non-empty dependencies array",
|
|
936
936
|
requiresTypeChecking: false
|
|
937
937
|
},
|
|
938
938
|
schema: [],
|
|
939
939
|
messages: {
|
|
940
|
-
ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS: "
|
|
940
|
+
ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS: "useMemo should have a non-empty dependencies array"
|
|
941
941
|
}
|
|
942
942
|
},
|
|
943
943
|
defaultOptions: [],
|
|
@@ -987,12 +987,12 @@ var preferUseStateLazyInitialization = createRule({
|
|
|
987
987
|
meta: {
|
|
988
988
|
type: "problem",
|
|
989
989
|
docs: {
|
|
990
|
-
description: "disallow function calls in
|
|
990
|
+
description: "disallow function calls in 'useState' that aren't wrapped in an initializer function",
|
|
991
991
|
requiresTypeChecking: false
|
|
992
992
|
},
|
|
993
993
|
schema: [],
|
|
994
994
|
messages: {
|
|
995
|
-
PREFER_USE_STATE_LAZY_INITIALIZATION: "To prevent re-computation, consider using lazy initial state for useState calls that involve function calls. Ex:
|
|
995
|
+
PREFER_USE_STATE_LAZY_INITIALIZATION: "To prevent re-computation, consider using lazy initial state for useState calls that involve function calls. Ex: 'useState(() => getValue())'"
|
|
996
996
|
}
|
|
997
997
|
},
|
|
998
998
|
defaultOptions: [],
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var jsx = require('@eslint-react/jsx');
|
|
|
7
7
|
var _var = require('@eslint-react/var');
|
|
8
8
|
|
|
9
9
|
var name = "eslint-plugin-react-hooks-extra";
|
|
10
|
-
var version = "1.5.
|
|
10
|
+
var version = "1.5.3-beta.1";
|
|
11
11
|
|
|
12
12
|
const createRule = shared.createRuleForPlugin("hooks-extra");
|
|
13
13
|
|
|
@@ -883,12 +883,12 @@ var ensureUseCallbackHasNonEmptyDeps = createRule({
|
|
|
883
883
|
meta: {
|
|
884
884
|
type: "problem",
|
|
885
885
|
docs: {
|
|
886
|
-
description: "enforce
|
|
886
|
+
description: "enforce 'useCallback' has non-empty dependencies array",
|
|
887
887
|
requiresTypeChecking: false
|
|
888
888
|
},
|
|
889
889
|
schema: [],
|
|
890
890
|
messages: {
|
|
891
|
-
ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS: "
|
|
891
|
+
ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS: "useCallback should have a non-empty dependencies array"
|
|
892
892
|
}
|
|
893
893
|
},
|
|
894
894
|
defaultOptions: [],
|
|
@@ -932,12 +932,12 @@ var ensureUseMemoHasNonEmptyDeps = createRule({
|
|
|
932
932
|
meta: {
|
|
933
933
|
type: "problem",
|
|
934
934
|
docs: {
|
|
935
|
-
description: "enforce
|
|
935
|
+
description: "enforce 'useMemo' has non-empty dependencies array",
|
|
936
936
|
requiresTypeChecking: false
|
|
937
937
|
},
|
|
938
938
|
schema: [],
|
|
939
939
|
messages: {
|
|
940
|
-
ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS: "
|
|
940
|
+
ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS: "useMemo should have a non-empty dependencies array"
|
|
941
941
|
}
|
|
942
942
|
},
|
|
943
943
|
defaultOptions: [],
|
|
@@ -987,12 +987,12 @@ var preferUseStateLazyInitialization = createRule({
|
|
|
987
987
|
meta: {
|
|
988
988
|
type: "problem",
|
|
989
989
|
docs: {
|
|
990
|
-
description: "disallow function calls in
|
|
990
|
+
description: "disallow function calls in 'useState' that aren't wrapped in an initializer function",
|
|
991
991
|
requiresTypeChecking: false
|
|
992
992
|
},
|
|
993
993
|
schema: [],
|
|
994
994
|
messages: {
|
|
995
|
-
PREFER_USE_STATE_LAZY_INITIALIZATION: "To prevent re-computation, consider using lazy initial state for useState calls that involve function calls. Ex:
|
|
995
|
+
PREFER_USE_STATE_LAZY_INITIALIZATION: "To prevent re-computation, consider using lazy initial state for useState calls that involve function calls. Ex: 'useState(() => getValue())'"
|
|
996
996
|
}
|
|
997
997
|
},
|
|
998
998
|
defaultOptions: [],
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { getPragmaFromContext } from '@eslint-react/jsx';
|
|
|
5
5
|
import { findVariable, getVariableInit } from '@eslint-react/var';
|
|
6
6
|
|
|
7
7
|
var name = "eslint-plugin-react-hooks-extra";
|
|
8
|
-
var version = "1.5.
|
|
8
|
+
var version = "1.5.3-beta.1";
|
|
9
9
|
|
|
10
10
|
const createRule = createRuleForPlugin("hooks-extra");
|
|
11
11
|
|
|
@@ -881,12 +881,12 @@ var ensureUseCallbackHasNonEmptyDeps = createRule({
|
|
|
881
881
|
meta: {
|
|
882
882
|
type: "problem",
|
|
883
883
|
docs: {
|
|
884
|
-
description: "enforce
|
|
884
|
+
description: "enforce 'useCallback' has non-empty dependencies array",
|
|
885
885
|
requiresTypeChecking: false
|
|
886
886
|
},
|
|
887
887
|
schema: [],
|
|
888
888
|
messages: {
|
|
889
|
-
ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS: "
|
|
889
|
+
ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS: "useCallback should have a non-empty dependencies array"
|
|
890
890
|
}
|
|
891
891
|
},
|
|
892
892
|
defaultOptions: [],
|
|
@@ -930,12 +930,12 @@ var ensureUseMemoHasNonEmptyDeps = createRule({
|
|
|
930
930
|
meta: {
|
|
931
931
|
type: "problem",
|
|
932
932
|
docs: {
|
|
933
|
-
description: "enforce
|
|
933
|
+
description: "enforce 'useMemo' has non-empty dependencies array",
|
|
934
934
|
requiresTypeChecking: false
|
|
935
935
|
},
|
|
936
936
|
schema: [],
|
|
937
937
|
messages: {
|
|
938
|
-
ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS: "
|
|
938
|
+
ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS: "useMemo should have a non-empty dependencies array"
|
|
939
939
|
}
|
|
940
940
|
},
|
|
941
941
|
defaultOptions: [],
|
|
@@ -985,12 +985,12 @@ var preferUseStateLazyInitialization = createRule({
|
|
|
985
985
|
meta: {
|
|
986
986
|
type: "problem",
|
|
987
987
|
docs: {
|
|
988
|
-
description: "disallow function calls in
|
|
988
|
+
description: "disallow function calls in 'useState' that aren't wrapped in an initializer function",
|
|
989
989
|
requiresTypeChecking: false
|
|
990
990
|
},
|
|
991
991
|
schema: [],
|
|
992
992
|
messages: {
|
|
993
|
-
PREFER_USE_STATE_LAZY_INITIALIZATION: "To prevent re-computation, consider using lazy initial state for useState calls that involve function calls. Ex:
|
|
993
|
+
PREFER_USE_STATE_LAZY_INITIALIZATION: "To prevent re-computation, consider using lazy initial state for useState calls that involve function calls. Ex: 'useState(() => getValue())'"
|
|
994
994
|
}
|
|
995
995
|
},
|
|
996
996
|
defaultOptions: [],
|
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.3-beta.1",
|
|
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,19 +35,19 @@
|
|
|
35
35
|
"./package.json"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@typescript-eslint/parser": ">=6.
|
|
39
|
-
"@typescript-eslint/scope-manager": ">=6.
|
|
40
|
-
"@typescript-eslint/type-utils": ">=6.
|
|
41
|
-
"@typescript-eslint/types": ">=6.
|
|
42
|
-
"@typescript-eslint/utils": ">=6.
|
|
38
|
+
"@typescript-eslint/parser": ">=6.21.0",
|
|
39
|
+
"@typescript-eslint/scope-manager": ">=6.21.0",
|
|
40
|
+
"@typescript-eslint/type-utils": ">=6.21.0",
|
|
41
|
+
"@typescript-eslint/types": ">=6.21.0",
|
|
42
|
+
"@typescript-eslint/utils": ">=6.21.0",
|
|
43
43
|
"string-ts": "2.0.0",
|
|
44
|
-
"@eslint-react/ast": "1.5.
|
|
45
|
-
"@eslint-react/core": "1.5.
|
|
46
|
-
"@eslint-react/jsx": "1.5.
|
|
47
|
-
"@eslint-react/shared": "1.5.
|
|
48
|
-
"@eslint-react/tools": "1.5.
|
|
49
|
-
"@eslint-react/types": "1.5.
|
|
50
|
-
"@eslint-react/var": "1.5.
|
|
44
|
+
"@eslint-react/ast": "1.5.3-beta.1",
|
|
45
|
+
"@eslint-react/core": "1.5.3-beta.1",
|
|
46
|
+
"@eslint-react/jsx": "1.5.3-beta.1",
|
|
47
|
+
"@eslint-react/shared": "1.5.3-beta.1",
|
|
48
|
+
"@eslint-react/tools": "1.5.3-beta.1",
|
|
49
|
+
"@eslint-react/types": "1.5.3-beta.1",
|
|
50
|
+
"@eslint-react/var": "1.5.3-beta.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"effect": "2.2.3"
|