eslint-plugin-react-hooks-extra 2.0.0-beta.53 → 2.0.0-beta.54
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.ts +7 -27
- package/dist/index.js +5 -5
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _eslint_react_shared0 from "@eslint-react/shared";
|
|
2
2
|
import { RulePreset } from "@eslint-react/kit";
|
|
3
3
|
|
|
4
4
|
//#region src/index.d.ts
|
|
@@ -6,23 +6,10 @@ declare const _default: {
|
|
|
6
6
|
configs: {
|
|
7
7
|
recommended: {
|
|
8
8
|
plugins: {
|
|
9
|
-
"react-hooks-extra":
|
|
10
|
-
readonly meta: {
|
|
11
|
-
readonly name: string;
|
|
12
|
-
readonly version: string;
|
|
13
|
-
};
|
|
14
|
-
readonly rules: {
|
|
15
|
-
readonly "no-direct-set-state-in-use-effect": _typescript_eslint_utils_ts_eslint0.RuleModule<"noDirectSetStateInUseEffect", [], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
16
|
-
readonly "no-direct-set-state-in-use-layout-effect": _typescript_eslint_utils_ts_eslint0.RuleModule<"noDirectSetStateInUseLayoutEffect", [], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
17
|
-
readonly "no-unnecessary-use-callback": _typescript_eslint_utils_ts_eslint0.RuleModule<"noUnnecessaryUseCallback", [], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
18
|
-
readonly "no-unnecessary-use-memo": _typescript_eslint_utils_ts_eslint0.RuleModule<"noUnnecessaryUseMemo", [], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
19
|
-
readonly "no-unnecessary-use-prefix": _typescript_eslint_utils_ts_eslint0.RuleModule<"noUnnecessaryUsePrefix", [], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
20
|
-
readonly "prefer-use-state-lazy-initialization": _typescript_eslint_utils_ts_eslint0.RuleModule<"preferUseStateLazyInitialization", [], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
9
|
+
"react-hooks-extra": _eslint_react_shared0.CompatiblePlugin;
|
|
23
10
|
};
|
|
24
|
-
name
|
|
25
|
-
rules
|
|
11
|
+
name?: string;
|
|
12
|
+
rules?: Record<string, any>;
|
|
26
13
|
};
|
|
27
14
|
"recommended-legacy": {
|
|
28
15
|
plugins: string[];
|
|
@@ -30,17 +17,10 @@ declare const _default: {
|
|
|
30
17
|
};
|
|
31
18
|
};
|
|
32
19
|
meta: {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
rules: {
|
|
37
|
-
readonly "no-direct-set-state-in-use-effect": _typescript_eslint_utils_ts_eslint0.RuleModule<"noDirectSetStateInUseEffect", [], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
38
|
-
readonly "no-direct-set-state-in-use-layout-effect": _typescript_eslint_utils_ts_eslint0.RuleModule<"noDirectSetStateInUseLayoutEffect", [], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
39
|
-
readonly "no-unnecessary-use-callback": _typescript_eslint_utils_ts_eslint0.RuleModule<"noUnnecessaryUseCallback", [], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
40
|
-
readonly "no-unnecessary-use-memo": _typescript_eslint_utils_ts_eslint0.RuleModule<"noUnnecessaryUseMemo", [], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
41
|
-
readonly "no-unnecessary-use-prefix": _typescript_eslint_utils_ts_eslint0.RuleModule<"noUnnecessaryUsePrefix", [], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
42
|
-
readonly "prefer-use-state-lazy-initialization": _typescript_eslint_utils_ts_eslint0.RuleModule<"preferUseStateLazyInitialization", [], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
20
|
+
name: string;
|
|
21
|
+
version: string;
|
|
43
22
|
};
|
|
23
|
+
rules: Record<string, any>;
|
|
44
24
|
};
|
|
45
25
|
//#endregion
|
|
46
26
|
export { _default as default };
|
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ const rules = { "react-hooks-extra/no-direct-set-state-in-use-effect": "warn" };
|
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region package.json
|
|
31
31
|
var name = "eslint-plugin-react-hooks-extra";
|
|
32
|
-
var version = "2.0.0-beta.
|
|
32
|
+
var version = "2.0.0-beta.54";
|
|
33
33
|
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/rules-hooks/use-no-direct-set-state-in-use-effect.ts
|
|
@@ -638,13 +638,13 @@ const plugin = {
|
|
|
638
638
|
|
|
639
639
|
//#endregion
|
|
640
640
|
//#region src/index.ts
|
|
641
|
-
function
|
|
641
|
+
function toFlatConfig(config) {
|
|
642
642
|
return {
|
|
643
643
|
...config,
|
|
644
644
|
plugins: { "react-hooks-extra": plugin }
|
|
645
645
|
};
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function toLegacyConfig({ rules: rules$1 }) {
|
|
648
648
|
return {
|
|
649
649
|
plugins: ["react-hooks-extra"],
|
|
650
650
|
rules: rules$1
|
|
@@ -653,8 +653,8 @@ function makeLegacyConfig({ rules: rules$1 }) {
|
|
|
653
653
|
var src_default = {
|
|
654
654
|
...plugin,
|
|
655
655
|
configs: {
|
|
656
|
-
["recommended"]:
|
|
657
|
-
["recommended-legacy"]:
|
|
656
|
+
["recommended"]: toFlatConfig(recommended_exports),
|
|
657
|
+
["recommended-legacy"]: toLegacyConfig(recommended_exports)
|
|
658
658
|
}
|
|
659
659
|
};
|
|
660
660
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-hooks-extra",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.54",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for React Hooks related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
"@typescript-eslint/utils": "^8.41.0",
|
|
43
43
|
"string-ts": "^2.2.1",
|
|
44
44
|
"ts-pattern": "^5.8.0",
|
|
45
|
-
"@eslint-react/ast": "2.0.0-beta.
|
|
46
|
-
"@eslint-react/
|
|
47
|
-
"@eslint-react/kit": "2.0.0-beta.
|
|
48
|
-
"@eslint-react/
|
|
49
|
-
"@eslint-react/shared": "2.0.0-beta.
|
|
50
|
-
"@eslint-react/
|
|
45
|
+
"@eslint-react/ast": "2.0.0-beta.54",
|
|
46
|
+
"@eslint-react/eff": "2.0.0-beta.54",
|
|
47
|
+
"@eslint-react/kit": "2.0.0-beta.54",
|
|
48
|
+
"@eslint-react/core": "2.0.0-beta.54",
|
|
49
|
+
"@eslint-react/shared": "2.0.0-beta.54",
|
|
50
|
+
"@eslint-react/var": "2.0.0-beta.54"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/react": "^19.1.12",
|
|
54
|
-
"@types/react-dom": "^19.1.
|
|
54
|
+
"@types/react-dom": "^19.1.9",
|
|
55
55
|
"tsdown": "^0.14.2",
|
|
56
56
|
"@local/configs": "0.0.0"
|
|
57
57
|
},
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
|
-
"build": "tsdown
|
|
77
|
+
"build": "tsdown",
|
|
78
78
|
"lint:publish": "publint",
|
|
79
79
|
"lint:ts": "tsc --noEmit"
|
|
80
80
|
}
|