@eslint-react/shared 1.5.25-next.5 → 1.5.25-next.6
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 +95 -84
- package/dist/index.d.ts +95 -84
- package/dist/index.js +35 -54
- package/dist/index.mjs +34 -34
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
|
-
import * as
|
|
2
|
+
import * as valibot from 'valibot';
|
|
3
|
+
import { InferOutput } from 'valibot';
|
|
4
|
+
import { ReadonlyDeep } from 'type-fest';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* -----------------------------------------------------------------------------
|
|
@@ -36,89 +38,98 @@ declare const HOST_SVG_COMPONENT_TYPES: readonly ["a", "animate", "animateMotion
|
|
|
36
38
|
|
|
37
39
|
declare const createRuleForPlugin: (pluginName: string) => <Options extends readonly unknown[], MessageIds extends string>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds>>) => ESLintUtils.RuleModule<MessageIds, Options>;
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
declare const ESLintReactSettingsSchema: valibot.ObjectSchema<{
|
|
45
|
+
readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{
|
|
46
|
+
readonly use: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
47
|
+
readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
48
|
+
readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
49
|
+
readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
50
|
+
readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
51
|
+
readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
52
|
+
readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
53
|
+
readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
54
|
+
readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
55
|
+
readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
56
|
+
readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
57
|
+
readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
58
|
+
readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
59
|
+
readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
60
|
+
readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
61
|
+
readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
62
|
+
readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
63
|
+
}, undefined>, never>;
|
|
64
|
+
readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
65
|
+
readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
66
|
+
readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
67
|
+
readonly strict: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, never>;
|
|
68
|
+
readonly version: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
69
|
+
}, undefined>;
|
|
70
|
+
type ESLintReactSettings = ReadonlyDeep<InferOutput<typeof ESLintReactSettingsSchema>>;
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
declare const ESLintSettingsSchema: valibot.ObjectSchema<{
|
|
75
|
+
readonly "react-x": valibot.OptionalSchema<valibot.ObjectSchema<{
|
|
76
|
+
readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{
|
|
77
|
+
readonly use: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
78
|
+
readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
79
|
+
readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
80
|
+
readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
81
|
+
readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
82
|
+
readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
83
|
+
readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
84
|
+
readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
85
|
+
readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
86
|
+
readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
87
|
+
readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
88
|
+
readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
89
|
+
readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
90
|
+
readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
91
|
+
readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
92
|
+
readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
93
|
+
readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
94
|
+
}, undefined>, never>;
|
|
95
|
+
readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
96
|
+
readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
97
|
+
readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
98
|
+
readonly strict: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, never>;
|
|
99
|
+
readonly version: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
100
|
+
}, undefined>, never>;
|
|
101
|
+
/**
|
|
102
|
+
* @deprecated
|
|
103
|
+
*/
|
|
104
|
+
readonly reactOptions: valibot.OptionalSchema<valibot.ObjectSchema<{
|
|
105
|
+
readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{
|
|
106
|
+
readonly use: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
107
|
+
readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
108
|
+
readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
109
|
+
readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
110
|
+
readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
111
|
+
readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
112
|
+
readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
113
|
+
readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
114
|
+
readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
115
|
+
readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
116
|
+
readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
117
|
+
readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
118
|
+
readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
119
|
+
readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
120
|
+
readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
121
|
+
readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
122
|
+
readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
123
|
+
}, undefined>, never>;
|
|
124
|
+
readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
125
|
+
readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
126
|
+
readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
127
|
+
readonly strict: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, never>;
|
|
128
|
+
readonly version: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
129
|
+
}, undefined>, never>;
|
|
130
|
+
}, undefined>;
|
|
131
|
+
type ESLintSettings = ReadonlyDeep<InferOutput<typeof ESLintSettingsSchema>>;
|
|
121
132
|
|
|
122
133
|
declare function getESLintReactSettings(data: unknown): ESLintReactSettings;
|
|
123
134
|
|
|
124
|
-
export { ESLintReactSettings, ESLintSettings, GITHUB_URL, HOST_HTML_COMPONENT_TYPES, HOST_SVG_COMPONENT_TYPES, NPM_SCOPE, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, WEBSITE_URL, createRuleForPlugin, getESLintReactSettings };
|
|
135
|
+
export { type ESLintReactSettings, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, HOST_HTML_COMPONENT_TYPES, HOST_SVG_COMPONENT_TYPES, NPM_SCOPE, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, WEBSITE_URL, createRuleForPlugin, getESLintReactSettings };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
|
-
import * as
|
|
2
|
+
import * as valibot from 'valibot';
|
|
3
|
+
import { InferOutput } from 'valibot';
|
|
4
|
+
import { ReadonlyDeep } from 'type-fest';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* -----------------------------------------------------------------------------
|
|
@@ -36,89 +38,98 @@ declare const HOST_SVG_COMPONENT_TYPES: readonly ["a", "animate", "animateMotion
|
|
|
36
38
|
|
|
37
39
|
declare const createRuleForPlugin: (pluginName: string) => <Options extends readonly unknown[], MessageIds extends string>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds>>) => ESLintUtils.RuleModule<MessageIds, Options>;
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
declare const ESLintReactSettingsSchema: valibot.ObjectSchema<{
|
|
45
|
+
readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{
|
|
46
|
+
readonly use: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
47
|
+
readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
48
|
+
readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
49
|
+
readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
50
|
+
readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
51
|
+
readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
52
|
+
readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
53
|
+
readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
54
|
+
readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
55
|
+
readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
56
|
+
readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
57
|
+
readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
58
|
+
readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
59
|
+
readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
60
|
+
readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
61
|
+
readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
62
|
+
readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
63
|
+
}, undefined>, never>;
|
|
64
|
+
readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
65
|
+
readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
66
|
+
readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
67
|
+
readonly strict: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, never>;
|
|
68
|
+
readonly version: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
69
|
+
}, undefined>;
|
|
70
|
+
type ESLintReactSettings = ReadonlyDeep<InferOutput<typeof ESLintReactSettingsSchema>>;
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
declare const ESLintSettingsSchema: valibot.ObjectSchema<{
|
|
75
|
+
readonly "react-x": valibot.OptionalSchema<valibot.ObjectSchema<{
|
|
76
|
+
readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{
|
|
77
|
+
readonly use: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
78
|
+
readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
79
|
+
readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
80
|
+
readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
81
|
+
readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
82
|
+
readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
83
|
+
readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
84
|
+
readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
85
|
+
readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
86
|
+
readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
87
|
+
readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
88
|
+
readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
89
|
+
readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
90
|
+
readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
91
|
+
readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
92
|
+
readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
93
|
+
readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
94
|
+
}, undefined>, never>;
|
|
95
|
+
readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
96
|
+
readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
97
|
+
readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
98
|
+
readonly strict: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, never>;
|
|
99
|
+
readonly version: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
100
|
+
}, undefined>, never>;
|
|
101
|
+
/**
|
|
102
|
+
* @deprecated
|
|
103
|
+
*/
|
|
104
|
+
readonly reactOptions: valibot.OptionalSchema<valibot.ObjectSchema<{
|
|
105
|
+
readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{
|
|
106
|
+
readonly use: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
107
|
+
readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
108
|
+
readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
109
|
+
readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
110
|
+
readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
111
|
+
readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
112
|
+
readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
113
|
+
readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
114
|
+
readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
115
|
+
readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
116
|
+
readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
117
|
+
readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
118
|
+
readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
119
|
+
readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
120
|
+
readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
121
|
+
readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
122
|
+
readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>;
|
|
123
|
+
}, undefined>, never>;
|
|
124
|
+
readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
125
|
+
readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
126
|
+
readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
127
|
+
readonly strict: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, never>;
|
|
128
|
+
readonly version: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
129
|
+
}, undefined>, never>;
|
|
130
|
+
}, undefined>;
|
|
131
|
+
type ESLintSettings = ReadonlyDeep<InferOutput<typeof ESLintSettingsSchema>>;
|
|
121
132
|
|
|
122
133
|
declare function getESLintReactSettings(data: unknown): ESLintReactSettings;
|
|
123
134
|
|
|
124
|
-
export { ESLintReactSettings, ESLintSettings, GITHUB_URL, HOST_HTML_COMPONENT_TYPES, HOST_SVG_COMPONENT_TYPES, NPM_SCOPE, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, WEBSITE_URL, createRuleForPlugin, getESLintReactSettings };
|
|
135
|
+
export { type ESLintReactSettings, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, HOST_HTML_COMPONENT_TYPES, HOST_SVG_COMPONENT_TYPES, NPM_SCOPE, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, WEBSITE_URL, createRuleForPlugin, getESLintReactSettings };
|
package/dist/index.js
CHANGED
|
@@ -1,27 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var utils = require('@typescript-eslint/utils');
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
function _interopNamespace(e) {
|
|
7
|
-
if (e && e.__esModule) return e;
|
|
8
|
-
var n = Object.create(null);
|
|
9
|
-
if (e) {
|
|
10
|
-
Object.keys(e).forEach(function (k) {
|
|
11
|
-
if (k !== 'default') {
|
|
12
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () { return e[k]; }
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
n.default = e;
|
|
21
|
-
return Object.freeze(n);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
var S__namespace = /*#__PURE__*/_interopNamespace(S);
|
|
4
|
+
var valibot = require('valibot');
|
|
25
5
|
|
|
26
6
|
// src/constants.ts
|
|
27
7
|
var NPM_SCOPE = "@eslint-react";
|
|
@@ -209,45 +189,46 @@ var getDocsUrl = (pluginName) => (ruleName) => {
|
|
|
209
189
|
return `${WEBSITE_URL}/docs/rules/${pluginName}-${ruleName}`;
|
|
210
190
|
};
|
|
211
191
|
var createRuleForPlugin = (pluginName) => utils.ESLintUtils.RuleCreator(getDocsUrl(pluginName));
|
|
212
|
-
var
|
|
213
|
-
additionalHooks:
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
),
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
strict: S__namespace.optional(S__namespace.Boolean),
|
|
238
|
-
version: S__namespace.optional(S__namespace.String)
|
|
192
|
+
var ESLintReactSettingsSchema = valibot.object({
|
|
193
|
+
additionalHooks: valibot.optional(valibot.object({
|
|
194
|
+
use: valibot.optional(valibot.string()),
|
|
195
|
+
useCallback: valibot.optional(valibot.array(valibot.string())),
|
|
196
|
+
useContext: valibot.optional(valibot.array(valibot.string())),
|
|
197
|
+
useDebugValue: valibot.optional(valibot.array(valibot.string())),
|
|
198
|
+
useDeferredValue: valibot.optional(valibot.array(valibot.string())),
|
|
199
|
+
useEffect: valibot.optional(valibot.array(valibot.string())),
|
|
200
|
+
useId: valibot.optional(valibot.array(valibot.string())),
|
|
201
|
+
useImperativeHandle: valibot.optional(valibot.array(valibot.string())),
|
|
202
|
+
useInsertionEffect: valibot.optional(valibot.array(valibot.string())),
|
|
203
|
+
useLayoutEffect: valibot.optional(valibot.array(valibot.string())),
|
|
204
|
+
useMemo: valibot.optional(valibot.array(valibot.string())),
|
|
205
|
+
useOptimistic: valibot.optional(valibot.array(valibot.string())),
|
|
206
|
+
useReducer: valibot.optional(valibot.array(valibot.string())),
|
|
207
|
+
useRef: valibot.optional(valibot.array(valibot.string())),
|
|
208
|
+
useState: valibot.optional(valibot.array(valibot.string())),
|
|
209
|
+
useSyncExternalStore: valibot.optional(valibot.array(valibot.string())),
|
|
210
|
+
useTransition: valibot.optional(valibot.array(valibot.string()))
|
|
211
|
+
})),
|
|
212
|
+
importSource: valibot.optional(valibot.string()),
|
|
213
|
+
jsxPragma: valibot.optional(valibot.string()),
|
|
214
|
+
jsxPragmaFrag: valibot.optional(valibot.string()),
|
|
215
|
+
strict: valibot.optional(valibot.boolean()),
|
|
216
|
+
version: valibot.optional(valibot.string())
|
|
239
217
|
});
|
|
240
|
-
var
|
|
241
|
-
"react-x":
|
|
242
|
-
|
|
218
|
+
var ESLintSettingsSchema = valibot.object({
|
|
219
|
+
"react-x": valibot.optional(ESLintReactSettingsSchema),
|
|
220
|
+
/**
|
|
221
|
+
* @deprecated
|
|
222
|
+
*/
|
|
223
|
+
reactOptions: valibot.optional(ESLintReactSettingsSchema)
|
|
243
224
|
});
|
|
244
225
|
function getESLintReactSettings(data) {
|
|
245
|
-
const settings =
|
|
226
|
+
const settings = valibot.parse(ESLintSettingsSchema, data);
|
|
246
227
|
return settings["react-x"] ?? settings.reactOptions ?? {};
|
|
247
228
|
}
|
|
248
229
|
|
|
249
|
-
exports.
|
|
250
|
-
exports.
|
|
230
|
+
exports.ESLintReactSettingsSchema = ESLintReactSettingsSchema;
|
|
231
|
+
exports.ESLintSettingsSchema = ESLintSettingsSchema;
|
|
251
232
|
exports.GITHUB_URL = GITHUB_URL;
|
|
252
233
|
exports.HOST_HTML_COMPONENT_TYPES = HOST_HTML_COMPONENT_TYPES;
|
|
253
234
|
exports.HOST_SVG_COMPONENT_TYPES = HOST_SVG_COMPONENT_TYPES;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
|
-
import
|
|
3
|
-
import { decodeUnknownSync } from '@effect/schema/Schema';
|
|
2
|
+
import { object, optional, string, array, boolean, parse } from 'valibot';
|
|
4
3
|
|
|
5
4
|
// src/constants.ts
|
|
6
5
|
var NPM_SCOPE = "@eslint-react";
|
|
@@ -188,41 +187,42 @@ var getDocsUrl = (pluginName) => (ruleName) => {
|
|
|
188
187
|
return `${WEBSITE_URL}/docs/rules/${pluginName}-${ruleName}`;
|
|
189
188
|
};
|
|
190
189
|
var createRuleForPlugin = (pluginName) => ESLintUtils.RuleCreator(getDocsUrl(pluginName));
|
|
191
|
-
var
|
|
192
|
-
additionalHooks:
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
),
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
strict: S.optional(S.Boolean),
|
|
217
|
-
version: S.optional(S.String)
|
|
190
|
+
var ESLintReactSettingsSchema = object({
|
|
191
|
+
additionalHooks: optional(object({
|
|
192
|
+
use: optional(string()),
|
|
193
|
+
useCallback: optional(array(string())),
|
|
194
|
+
useContext: optional(array(string())),
|
|
195
|
+
useDebugValue: optional(array(string())),
|
|
196
|
+
useDeferredValue: optional(array(string())),
|
|
197
|
+
useEffect: optional(array(string())),
|
|
198
|
+
useId: optional(array(string())),
|
|
199
|
+
useImperativeHandle: optional(array(string())),
|
|
200
|
+
useInsertionEffect: optional(array(string())),
|
|
201
|
+
useLayoutEffect: optional(array(string())),
|
|
202
|
+
useMemo: optional(array(string())),
|
|
203
|
+
useOptimistic: optional(array(string())),
|
|
204
|
+
useReducer: optional(array(string())),
|
|
205
|
+
useRef: optional(array(string())),
|
|
206
|
+
useState: optional(array(string())),
|
|
207
|
+
useSyncExternalStore: optional(array(string())),
|
|
208
|
+
useTransition: optional(array(string()))
|
|
209
|
+
})),
|
|
210
|
+
importSource: optional(string()),
|
|
211
|
+
jsxPragma: optional(string()),
|
|
212
|
+
jsxPragmaFrag: optional(string()),
|
|
213
|
+
strict: optional(boolean()),
|
|
214
|
+
version: optional(string())
|
|
218
215
|
});
|
|
219
|
-
var
|
|
220
|
-
"react-x":
|
|
221
|
-
|
|
216
|
+
var ESLintSettingsSchema = object({
|
|
217
|
+
"react-x": optional(ESLintReactSettingsSchema),
|
|
218
|
+
/**
|
|
219
|
+
* @deprecated
|
|
220
|
+
*/
|
|
221
|
+
reactOptions: optional(ESLintReactSettingsSchema)
|
|
222
222
|
});
|
|
223
223
|
function getESLintReactSettings(data) {
|
|
224
|
-
const settings =
|
|
224
|
+
const settings = parse(ESLintSettingsSchema, data);
|
|
225
225
|
return settings["react-x"] ?? settings.reactOptions ?? {};
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
export {
|
|
228
|
+
export { ESLintReactSettingsSchema, ESLintSettingsSchema, GITHUB_URL, HOST_HTML_COMPONENT_TYPES, HOST_SVG_COMPONENT_TYPES, NPM_SCOPE, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, WEBSITE_URL, createRuleForPlugin, getESLintReactSettings };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/shared",
|
|
3
|
-
"version": "1.5.25-next.
|
|
3
|
+
"version": "1.5.25-next.6",
|
|
4
4
|
"description": "ESLint React's Shared constants and functions.",
|
|
5
5
|
"homepage": "https://github.com/rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"./package.json"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@
|
|
39
|
-
"
|
|
38
|
+
"@typescript-eslint/utils": "^7.16.0",
|
|
39
|
+
"valibot": "^0.36.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"effect": "3.5.1",
|