@eslint-react/shared 1.20.0-beta.2 → 1.20.0-beta.9
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 +13 -88
- package/dist/index.d.ts +13 -88
- package/dist/index.js +12 -3
- package/dist/index.mjs +12 -3
- package/package.json +5 -4
package/dist/index.d.mts
CHANGED
|
@@ -41,7 +41,7 @@ declare const HOST_HTML_COMPONENT_TYPES: readonly ["aside", "audio", "b", "base"
|
|
|
41
41
|
* @internal
|
|
42
42
|
*/
|
|
43
43
|
declare const HOST_SVG_COMPONENT_TYPES: readonly ["a", "animate", "animateMotion", "animateTransform", "circle", "clipPath", "defs", "desc", "discard", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "foreignObject", "g", "hatch", "hatchpath", "image", "line", "linearGradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "script", "set", "stop", "style", "svg", "switch", "symbol", "text", "textPath", "title", "tspan", "use", "view"];
|
|
44
|
-
declare const REACT_BUILD_IN_HOOKS: readonly ["useActionState", "useCallback", "useContext", "useDebugValue", "useDeferredValue", "useEffect", "useId", "useImperativeHandle", "useInsertionEffect", "useLayoutEffect", "useMemo", "useOptimistic", "useReducer", "useRef", "useState", "useSyncExternalStore", "useTransition"];
|
|
44
|
+
declare const REACT_BUILD_IN_HOOKS: readonly ["use", "useActionState", "useCallback", "useContext", "useDebugValue", "useDeferredValue", "useEffect", "useFormStatus", "useId", "useImperativeHandle", "useInsertionEffect", "useLayoutEffect", "useMemo", "useOptimistic", "useReducer", "useRef", "useState", "useSyncExternalStore", "useTransition"];
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Get the ESLint rule creator for a plugin.
|
|
@@ -2152,9 +2152,16 @@ type PartialObjectDeep<ObjectType extends object, Options extends PartialDeepOpt
|
|
|
2152
2152
|
};
|
|
2153
2153
|
|
|
2154
2154
|
/**
|
|
2155
|
-
* The
|
|
2155
|
+
* The default ESLint settings for "react-x".
|
|
2156
2156
|
*/
|
|
2157
|
-
declare const
|
|
2157
|
+
declare const DEFAULT_ESLINT_REACT_SETTINGS: {
|
|
2158
|
+
readonly additionalHooks: {
|
|
2159
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
2160
|
+
};
|
|
2161
|
+
readonly polymorphicPropName: "as";
|
|
2162
|
+
readonly strictImportCheck: false;
|
|
2163
|
+
readonly version: "detect";
|
|
2164
|
+
};
|
|
2158
2165
|
/**
|
|
2159
2166
|
* Unsafely casts settings from a data object from `context.settings`.
|
|
2160
2167
|
* @internal
|
|
@@ -2168,96 +2175,14 @@ declare function unsafeReadSettings(data: unknown): PartialDeep<ESLintReactSetti
|
|
|
2168
2175
|
* @param data The data object.
|
|
2169
2176
|
* @returns settings The settings.
|
|
2170
2177
|
*/
|
|
2171
|
-
declare const decodeSettings: Memoized<(data: unknown) =>
|
|
2172
|
-
readonly importSource?: string;
|
|
2173
|
-
readonly jsxPragma?: string;
|
|
2174
|
-
readonly jsxPragmaFrag?: string;
|
|
2175
|
-
readonly polymorphicPropName?: string;
|
|
2176
|
-
readonly strict?: boolean;
|
|
2177
|
-
readonly strictImportCheck?: boolean;
|
|
2178
|
-
readonly version?: string;
|
|
2179
|
-
readonly additionalComponents?: {
|
|
2180
|
-
name: string;
|
|
2181
|
-
as?: string;
|
|
2182
|
-
selector?: string;
|
|
2183
|
-
attributes?: {
|
|
2184
|
-
name: string;
|
|
2185
|
-
as?: string;
|
|
2186
|
-
controlled?: boolean;
|
|
2187
|
-
defaultValue?: string;
|
|
2188
|
-
}[];
|
|
2189
|
-
}[];
|
|
2190
|
-
readonly additionalHooks?: {
|
|
2191
|
-
use?: string[];
|
|
2192
|
-
useActionState?: string[];
|
|
2193
|
-
useCallback?: string[];
|
|
2194
|
-
useContext?: string[];
|
|
2195
|
-
useDebugValue?: string[];
|
|
2196
|
-
useDeferredValue?: string[];
|
|
2197
|
-
useEffect?: string[];
|
|
2198
|
-
useId?: string[];
|
|
2199
|
-
useImperativeHandle?: string[];
|
|
2200
|
-
useInsertionEffect?: string[];
|
|
2201
|
-
useLayoutEffect?: string[];
|
|
2202
|
-
useMemo?: string[];
|
|
2203
|
-
useOptimistic?: string[];
|
|
2204
|
-
useReducer?: string[];
|
|
2205
|
-
useRef?: string[];
|
|
2206
|
-
useState?: string[];
|
|
2207
|
-
useSyncExternalStore?: string[];
|
|
2208
|
-
useTransition?: string[];
|
|
2209
|
-
useFormStatus?: string[];
|
|
2210
|
-
};
|
|
2211
|
-
}>;
|
|
2178
|
+
declare const decodeSettings: Memoized<(data: unknown) => ESLintReactSettings>;
|
|
2212
2179
|
/**
|
|
2213
2180
|
* Normalizes the settings by converting all shorthand properties to their full form.
|
|
2214
2181
|
* @param settings The settings.
|
|
2215
2182
|
* @returns The normalized settings.
|
|
2216
2183
|
* @internal
|
|
2217
2184
|
*/
|
|
2218
|
-
declare const normalizeSettings: Memoized<(settings: ESLintReactSettings) =>
|
|
2219
|
-
readonly additionalComponents: {
|
|
2220
|
-
attributes: {
|
|
2221
|
-
as: string;
|
|
2222
|
-
name: string;
|
|
2223
|
-
controlled?: boolean;
|
|
2224
|
-
defaultValue?: string;
|
|
2225
|
-
}[];
|
|
2226
|
-
re: RegExp;
|
|
2227
|
-
name: string;
|
|
2228
|
-
as?: string;
|
|
2229
|
-
selector?: string;
|
|
2230
|
-
}[];
|
|
2231
|
-
readonly components: Map<string, string>;
|
|
2232
|
-
readonly version: string;
|
|
2233
|
-
readonly importSource?: string;
|
|
2234
|
-
readonly jsxPragma?: string;
|
|
2235
|
-
readonly jsxPragmaFrag?: string;
|
|
2236
|
-
readonly polymorphicPropName?: string;
|
|
2237
|
-
readonly strict?: boolean;
|
|
2238
|
-
readonly strictImportCheck?: boolean;
|
|
2239
|
-
readonly additionalHooks?: {
|
|
2240
|
-
use?: string[];
|
|
2241
|
-
useActionState?: string[];
|
|
2242
|
-
useCallback?: string[];
|
|
2243
|
-
useContext?: string[];
|
|
2244
|
-
useDebugValue?: string[];
|
|
2245
|
-
useDeferredValue?: string[];
|
|
2246
|
-
useEffect?: string[];
|
|
2247
|
-
useId?: string[];
|
|
2248
|
-
useImperativeHandle?: string[];
|
|
2249
|
-
useInsertionEffect?: string[];
|
|
2250
|
-
useLayoutEffect?: string[];
|
|
2251
|
-
useMemo?: string[];
|
|
2252
|
-
useOptimistic?: string[];
|
|
2253
|
-
useReducer?: string[];
|
|
2254
|
-
useRef?: string[];
|
|
2255
|
-
useState?: string[];
|
|
2256
|
-
useSyncExternalStore?: string[];
|
|
2257
|
-
useTransition?: string[];
|
|
2258
|
-
useFormStatus?: string[];
|
|
2259
|
-
};
|
|
2260
|
-
}>;
|
|
2185
|
+
declare const normalizeSettings: Memoized<(settings: ESLintReactSettings) => ESLintReactSettingsNormalized>;
|
|
2261
2186
|
/**
|
|
2262
2187
|
* A helper function to define settings for "react-x" with type checking in JavaScript files.
|
|
2263
2188
|
* @param settings The settings.
|
|
@@ -2270,4 +2195,4 @@ declare module "@typescript-eslint/utils/ts-eslint" {
|
|
|
2270
2195
|
}
|
|
2271
2196
|
}
|
|
2272
2197
|
|
|
2273
|
-
export { type CustomAttribute, CustomAttributeSchema, type CustomComponent, type CustomComponentNormalized, CustomComponentNormalizedSchema, CustomComponentSchema, type CustomHook, CustomHookSchema, type ESLintReactSettings, type ESLintReactSettingsNormalized, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, HOST_HTML_COMPONENT_TYPES, HOST_SVG_COMPONENT_TYPES,
|
|
2198
|
+
export { type CustomAttribute, CustomAttributeSchema, type CustomComponent, type CustomComponentNormalized, CustomComponentNormalizedSchema, CustomComponentSchema, type CustomHook, CustomHookSchema, DEFAULT_ESLINT_REACT_SETTINGS, type ESLintReactSettings, type ESLintReactSettingsNormalized, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, HOST_HTML_COMPONENT_TYPES, HOST_SVG_COMPONENT_TYPES, NPM_SCOPE, REACT_BUILD_IN_HOOKS, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, WEBSITE_URL, createRuleForPlugin, decodeSettings, defineSettings, normalizeSettings, unsafeReadSettings };
|
package/dist/index.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ declare const HOST_HTML_COMPONENT_TYPES: readonly ["aside", "audio", "b", "base"
|
|
|
41
41
|
* @internal
|
|
42
42
|
*/
|
|
43
43
|
declare const HOST_SVG_COMPONENT_TYPES: readonly ["a", "animate", "animateMotion", "animateTransform", "circle", "clipPath", "defs", "desc", "discard", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "foreignObject", "g", "hatch", "hatchpath", "image", "line", "linearGradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "script", "set", "stop", "style", "svg", "switch", "symbol", "text", "textPath", "title", "tspan", "use", "view"];
|
|
44
|
-
declare const REACT_BUILD_IN_HOOKS: readonly ["useActionState", "useCallback", "useContext", "useDebugValue", "useDeferredValue", "useEffect", "useId", "useImperativeHandle", "useInsertionEffect", "useLayoutEffect", "useMemo", "useOptimistic", "useReducer", "useRef", "useState", "useSyncExternalStore", "useTransition"];
|
|
44
|
+
declare const REACT_BUILD_IN_HOOKS: readonly ["use", "useActionState", "useCallback", "useContext", "useDebugValue", "useDeferredValue", "useEffect", "useFormStatus", "useId", "useImperativeHandle", "useInsertionEffect", "useLayoutEffect", "useMemo", "useOptimistic", "useReducer", "useRef", "useState", "useSyncExternalStore", "useTransition"];
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Get the ESLint rule creator for a plugin.
|
|
@@ -2152,9 +2152,16 @@ type PartialObjectDeep<ObjectType extends object, Options extends PartialDeepOpt
|
|
|
2152
2152
|
};
|
|
2153
2153
|
|
|
2154
2154
|
/**
|
|
2155
|
-
* The
|
|
2155
|
+
* The default ESLint settings for "react-x".
|
|
2156
2156
|
*/
|
|
2157
|
-
declare const
|
|
2157
|
+
declare const DEFAULT_ESLINT_REACT_SETTINGS: {
|
|
2158
|
+
readonly additionalHooks: {
|
|
2159
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
2160
|
+
};
|
|
2161
|
+
readonly polymorphicPropName: "as";
|
|
2162
|
+
readonly strictImportCheck: false;
|
|
2163
|
+
readonly version: "detect";
|
|
2164
|
+
};
|
|
2158
2165
|
/**
|
|
2159
2166
|
* Unsafely casts settings from a data object from `context.settings`.
|
|
2160
2167
|
* @internal
|
|
@@ -2168,96 +2175,14 @@ declare function unsafeReadSettings(data: unknown): PartialDeep<ESLintReactSetti
|
|
|
2168
2175
|
* @param data The data object.
|
|
2169
2176
|
* @returns settings The settings.
|
|
2170
2177
|
*/
|
|
2171
|
-
declare const decodeSettings: Memoized<(data: unknown) =>
|
|
2172
|
-
readonly importSource?: string;
|
|
2173
|
-
readonly jsxPragma?: string;
|
|
2174
|
-
readonly jsxPragmaFrag?: string;
|
|
2175
|
-
readonly polymorphicPropName?: string;
|
|
2176
|
-
readonly strict?: boolean;
|
|
2177
|
-
readonly strictImportCheck?: boolean;
|
|
2178
|
-
readonly version?: string;
|
|
2179
|
-
readonly additionalComponents?: {
|
|
2180
|
-
name: string;
|
|
2181
|
-
as?: string;
|
|
2182
|
-
selector?: string;
|
|
2183
|
-
attributes?: {
|
|
2184
|
-
name: string;
|
|
2185
|
-
as?: string;
|
|
2186
|
-
controlled?: boolean;
|
|
2187
|
-
defaultValue?: string;
|
|
2188
|
-
}[];
|
|
2189
|
-
}[];
|
|
2190
|
-
readonly additionalHooks?: {
|
|
2191
|
-
use?: string[];
|
|
2192
|
-
useActionState?: string[];
|
|
2193
|
-
useCallback?: string[];
|
|
2194
|
-
useContext?: string[];
|
|
2195
|
-
useDebugValue?: string[];
|
|
2196
|
-
useDeferredValue?: string[];
|
|
2197
|
-
useEffect?: string[];
|
|
2198
|
-
useId?: string[];
|
|
2199
|
-
useImperativeHandle?: string[];
|
|
2200
|
-
useInsertionEffect?: string[];
|
|
2201
|
-
useLayoutEffect?: string[];
|
|
2202
|
-
useMemo?: string[];
|
|
2203
|
-
useOptimistic?: string[];
|
|
2204
|
-
useReducer?: string[];
|
|
2205
|
-
useRef?: string[];
|
|
2206
|
-
useState?: string[];
|
|
2207
|
-
useSyncExternalStore?: string[];
|
|
2208
|
-
useTransition?: string[];
|
|
2209
|
-
useFormStatus?: string[];
|
|
2210
|
-
};
|
|
2211
|
-
}>;
|
|
2178
|
+
declare const decodeSettings: Memoized<(data: unknown) => ESLintReactSettings>;
|
|
2212
2179
|
/**
|
|
2213
2180
|
* Normalizes the settings by converting all shorthand properties to their full form.
|
|
2214
2181
|
* @param settings The settings.
|
|
2215
2182
|
* @returns The normalized settings.
|
|
2216
2183
|
* @internal
|
|
2217
2184
|
*/
|
|
2218
|
-
declare const normalizeSettings: Memoized<(settings: ESLintReactSettings) =>
|
|
2219
|
-
readonly additionalComponents: {
|
|
2220
|
-
attributes: {
|
|
2221
|
-
as: string;
|
|
2222
|
-
name: string;
|
|
2223
|
-
controlled?: boolean;
|
|
2224
|
-
defaultValue?: string;
|
|
2225
|
-
}[];
|
|
2226
|
-
re: RegExp;
|
|
2227
|
-
name: string;
|
|
2228
|
-
as?: string;
|
|
2229
|
-
selector?: string;
|
|
2230
|
-
}[];
|
|
2231
|
-
readonly components: Map<string, string>;
|
|
2232
|
-
readonly version: string;
|
|
2233
|
-
readonly importSource?: string;
|
|
2234
|
-
readonly jsxPragma?: string;
|
|
2235
|
-
readonly jsxPragmaFrag?: string;
|
|
2236
|
-
readonly polymorphicPropName?: string;
|
|
2237
|
-
readonly strict?: boolean;
|
|
2238
|
-
readonly strictImportCheck?: boolean;
|
|
2239
|
-
readonly additionalHooks?: {
|
|
2240
|
-
use?: string[];
|
|
2241
|
-
useActionState?: string[];
|
|
2242
|
-
useCallback?: string[];
|
|
2243
|
-
useContext?: string[];
|
|
2244
|
-
useDebugValue?: string[];
|
|
2245
|
-
useDeferredValue?: string[];
|
|
2246
|
-
useEffect?: string[];
|
|
2247
|
-
useId?: string[];
|
|
2248
|
-
useImperativeHandle?: string[];
|
|
2249
|
-
useInsertionEffect?: string[];
|
|
2250
|
-
useLayoutEffect?: string[];
|
|
2251
|
-
useMemo?: string[];
|
|
2252
|
-
useOptimistic?: string[];
|
|
2253
|
-
useReducer?: string[];
|
|
2254
|
-
useRef?: string[];
|
|
2255
|
-
useState?: string[];
|
|
2256
|
-
useSyncExternalStore?: string[];
|
|
2257
|
-
useTransition?: string[];
|
|
2258
|
-
useFormStatus?: string[];
|
|
2259
|
-
};
|
|
2260
|
-
}>;
|
|
2185
|
+
declare const normalizeSettings: Memoized<(settings: ESLintReactSettings) => ESLintReactSettingsNormalized>;
|
|
2261
2186
|
/**
|
|
2262
2187
|
* A helper function to define settings for "react-x" with type checking in JavaScript files.
|
|
2263
2188
|
* @param settings The settings.
|
|
@@ -2270,4 +2195,4 @@ declare module "@typescript-eslint/utils/ts-eslint" {
|
|
|
2270
2195
|
}
|
|
2271
2196
|
}
|
|
2272
2197
|
|
|
2273
|
-
export { type CustomAttribute, CustomAttributeSchema, type CustomComponent, type CustomComponentNormalized, CustomComponentNormalizedSchema, CustomComponentSchema, type CustomHook, CustomHookSchema, type ESLintReactSettings, type ESLintReactSettingsNormalized, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, HOST_HTML_COMPONENT_TYPES, HOST_SVG_COMPONENT_TYPES,
|
|
2198
|
+
export { type CustomAttribute, CustomAttributeSchema, type CustomComponent, type CustomComponentNormalized, CustomComponentNormalizedSchema, CustomComponentSchema, type CustomHook, CustomHookSchema, DEFAULT_ESLINT_REACT_SETTINGS, type ESLintReactSettings, type ESLintReactSettingsNormalized, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, HOST_HTML_COMPONENT_TYPES, HOST_SVG_COMPONENT_TYPES, NPM_SCOPE, REACT_BUILD_IN_HOOKS, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, WEBSITE_URL, createRuleForPlugin, decodeSettings, defineSettings, normalizeSettings, unsafeReadSettings };
|
package/dist/index.js
CHANGED
|
@@ -192,12 +192,14 @@ var HOST_SVG_COMPONENT_TYPES = [
|
|
|
192
192
|
"view"
|
|
193
193
|
];
|
|
194
194
|
var REACT_BUILD_IN_HOOKS = [
|
|
195
|
+
"use",
|
|
195
196
|
"useActionState",
|
|
196
197
|
"useCallback",
|
|
197
198
|
"useContext",
|
|
198
199
|
"useDebugValue",
|
|
199
200
|
"useDeferredValue",
|
|
200
201
|
"useEffect",
|
|
202
|
+
"useFormStatus",
|
|
201
203
|
"useId",
|
|
202
204
|
"useImperativeHandle",
|
|
203
205
|
"useInsertionEffect",
|
|
@@ -1324,13 +1326,20 @@ function createMemoizedFunction(fn, options) {
|
|
|
1324
1326
|
memoized.options = normalizedOptions;
|
|
1325
1327
|
return memoized;
|
|
1326
1328
|
}
|
|
1327
|
-
var
|
|
1329
|
+
var DEFAULT_ESLINT_REACT_SETTINGS = {
|
|
1330
|
+
additionalHooks: {
|
|
1331
|
+
useLayoutEffect: ["useIsomorphicLayoutEffect"]
|
|
1332
|
+
},
|
|
1333
|
+
polymorphicPropName: "as",
|
|
1334
|
+
strictImportCheck: false,
|
|
1335
|
+
version: "detect"
|
|
1336
|
+
};
|
|
1328
1337
|
function unsafeReadSettings(data) {
|
|
1329
1338
|
return data?.["react-x"] ?? {};
|
|
1330
1339
|
}
|
|
1331
1340
|
var decodeSettings = createMemoizedFunction((data) => {
|
|
1332
1341
|
return {
|
|
1333
|
-
...
|
|
1342
|
+
...DEFAULT_ESLINT_REACT_SETTINGS,
|
|
1334
1343
|
...parse(ESLintSettingsSchema, data)["react-x"] ?? {}
|
|
1335
1344
|
};
|
|
1336
1345
|
}, { isEqual: (a, b) => a === b });
|
|
@@ -1361,12 +1370,12 @@ exports.CustomAttributeSchema = CustomAttributeSchema;
|
|
|
1361
1370
|
exports.CustomComponentNormalizedSchema = CustomComponentNormalizedSchema;
|
|
1362
1371
|
exports.CustomComponentSchema = CustomComponentSchema;
|
|
1363
1372
|
exports.CustomHookSchema = CustomHookSchema;
|
|
1373
|
+
exports.DEFAULT_ESLINT_REACT_SETTINGS = DEFAULT_ESLINT_REACT_SETTINGS;
|
|
1364
1374
|
exports.ESLintReactSettingsSchema = ESLintReactSettingsSchema;
|
|
1365
1375
|
exports.ESLintSettingsSchema = ESLintSettingsSchema;
|
|
1366
1376
|
exports.GITHUB_URL = GITHUB_URL;
|
|
1367
1377
|
exports.HOST_HTML_COMPONENT_TYPES = HOST_HTML_COMPONENT_TYPES;
|
|
1368
1378
|
exports.HOST_SVG_COMPONENT_TYPES = HOST_SVG_COMPONENT_TYPES;
|
|
1369
|
-
exports.INITIAL_ESLINT_REACT_SETTINGS = INITIAL_ESLINT_REACT_SETTINGS;
|
|
1370
1379
|
exports.NPM_SCOPE = NPM_SCOPE;
|
|
1371
1380
|
exports.REACT_BUILD_IN_HOOKS = REACT_BUILD_IN_HOOKS;
|
|
1372
1381
|
exports.RE_CAMEL_CASE = RE_CAMEL_CASE;
|
package/dist/index.mjs
CHANGED
|
@@ -186,12 +186,14 @@ var HOST_SVG_COMPONENT_TYPES = [
|
|
|
186
186
|
"view"
|
|
187
187
|
];
|
|
188
188
|
var REACT_BUILD_IN_HOOKS = [
|
|
189
|
+
"use",
|
|
189
190
|
"useActionState",
|
|
190
191
|
"useCallback",
|
|
191
192
|
"useContext",
|
|
192
193
|
"useDebugValue",
|
|
193
194
|
"useDeferredValue",
|
|
194
195
|
"useEffect",
|
|
196
|
+
"useFormStatus",
|
|
195
197
|
"useId",
|
|
196
198
|
"useImperativeHandle",
|
|
197
199
|
"useInsertionEffect",
|
|
@@ -1318,13 +1320,20 @@ function createMemoizedFunction(fn, options) {
|
|
|
1318
1320
|
memoized.options = normalizedOptions;
|
|
1319
1321
|
return memoized;
|
|
1320
1322
|
}
|
|
1321
|
-
var
|
|
1323
|
+
var DEFAULT_ESLINT_REACT_SETTINGS = {
|
|
1324
|
+
additionalHooks: {
|
|
1325
|
+
useLayoutEffect: ["useIsomorphicLayoutEffect"]
|
|
1326
|
+
},
|
|
1327
|
+
polymorphicPropName: "as",
|
|
1328
|
+
strictImportCheck: false,
|
|
1329
|
+
version: "detect"
|
|
1330
|
+
};
|
|
1322
1331
|
function unsafeReadSettings(data) {
|
|
1323
1332
|
return data?.["react-x"] ?? {};
|
|
1324
1333
|
}
|
|
1325
1334
|
var decodeSettings = createMemoizedFunction((data) => {
|
|
1326
1335
|
return {
|
|
1327
|
-
...
|
|
1336
|
+
...DEFAULT_ESLINT_REACT_SETTINGS,
|
|
1328
1337
|
...parse(ESLintSettingsSchema, data)["react-x"] ?? {}
|
|
1329
1338
|
};
|
|
1330
1339
|
}, { isEqual: (a, b) => a === b });
|
|
@@ -1351,4 +1360,4 @@ var normalizeSettings = createMemoizedFunction((settings) => {
|
|
|
1351
1360
|
}, { isEqual: shallowEqual });
|
|
1352
1361
|
var defineSettings = F.identity;
|
|
1353
1362
|
|
|
1354
|
-
export { CustomAttributeSchema, CustomComponentNormalizedSchema, CustomComponentSchema, CustomHookSchema, ESLintReactSettingsSchema, ESLintSettingsSchema, GITHUB_URL, HOST_HTML_COMPONENT_TYPES, HOST_SVG_COMPONENT_TYPES,
|
|
1363
|
+
export { CustomAttributeSchema, CustomComponentNormalizedSchema, CustomComponentSchema, CustomHookSchema, DEFAULT_ESLINT_REACT_SETTINGS, ESLintReactSettingsSchema, ESLintSettingsSchema, GITHUB_URL, HOST_HTML_COMPONENT_TYPES, HOST_SVG_COMPONENT_TYPES, NPM_SCOPE, REACT_BUILD_IN_HOOKS, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, WEBSITE_URL, createRuleForPlugin, decodeSettings, defineSettings, normalizeSettings, unsafeReadSettings };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/shared",
|
|
3
|
-
"version": "1.20.0-beta.
|
|
3
|
+
"version": "1.20.0-beta.9",
|
|
4
4
|
"description": "ESLint React's Shared constants and functions.",
|
|
5
5
|
"homepage": "https://github.com/rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -39,15 +39,16 @@
|
|
|
39
39
|
"local-pkg": "^0.5.1",
|
|
40
40
|
"picomatch": "^4.0.2",
|
|
41
41
|
"ts-pattern": "^5.5.0",
|
|
42
|
-
"@eslint-react/tools": "1.20.0-beta.
|
|
42
|
+
"@eslint-react/tools": "1.20.0-beta.9"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/picomatch": "^3.0.1",
|
|
46
46
|
"fast-equals": "^5.0.1",
|
|
47
47
|
"micro-memoize": "^4.1.2",
|
|
48
48
|
"tsup": "^8.3.5",
|
|
49
|
-
"type-fest": "^4.30.
|
|
50
|
-
"valibot": "^1.0.0-beta.9"
|
|
49
|
+
"type-fest": "^4.30.1",
|
|
50
|
+
"valibot": "^1.0.0-beta.9",
|
|
51
|
+
"@workspace/configs": "0.0.0"
|
|
51
52
|
},
|
|
52
53
|
"scripts": {
|
|
53
54
|
"build": "tsup --dts-resolve",
|