@eslint-react/shared 1.5.31-next.2 → 1.5.31-next.4
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 +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +26 -4
- package/dist/index.mjs +25 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -117,7 +117,7 @@ declare const CustomComponentSchema: valibot.ObjectSchema<{
|
|
|
117
117
|
/**
|
|
118
118
|
* @internal
|
|
119
119
|
*/
|
|
120
|
-
declare const
|
|
120
|
+
declare const ESLintReactSettingsSchema: valibot.ObjectSchema<{
|
|
121
121
|
readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
122
122
|
readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
123
123
|
readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
@@ -254,6 +254,7 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
|
|
|
254
254
|
}, undefined>, never>;
|
|
255
255
|
}, undefined>, never>;
|
|
256
256
|
/**
|
|
257
|
+
* @internal
|
|
257
258
|
* @deprecated
|
|
258
259
|
*/
|
|
259
260
|
readonly reactOptions: valibot.OptionalSchema<valibot.ObjectSchema<{
|
|
@@ -326,9 +327,10 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
|
|
|
326
327
|
type CustomHook = InferOutput<typeof CustomHookSchema>;
|
|
327
328
|
type CustomAttribute = InferOutput<typeof CustomAttributeSchema>;
|
|
328
329
|
type CustomComponent = InferOutput<typeof CustomComponentSchema>;
|
|
329
|
-
type
|
|
330
|
+
type ESLintReactSettings = InferOutput<typeof ESLintReactSettingsSchema>;
|
|
330
331
|
type ESLintSettings = InferOutput<typeof ESLintSettingsSchema>;
|
|
331
332
|
|
|
332
333
|
declare function parseESLintSettings(data: unknown): ESLintSettings;
|
|
334
|
+
declare const DEFAULT_ESLINT_REACT_SETTINGS: ESLintReactSettings;
|
|
333
335
|
|
|
334
|
-
export { type CustomAttribute, CustomAttributeSchema, type CustomComponent, CustomComponentSchema, type CustomHook, CustomHookSchema, type
|
|
336
|
+
export { type CustomAttribute, CustomAttributeSchema, type CustomComponent, CustomComponentSchema, type CustomHook, CustomHookSchema, DEFAULT_ESLINT_REACT_SETTINGS, 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, parseESLintSettings };
|
package/dist/index.d.ts
CHANGED
|
@@ -117,7 +117,7 @@ declare const CustomComponentSchema: valibot.ObjectSchema<{
|
|
|
117
117
|
/**
|
|
118
118
|
* @internal
|
|
119
119
|
*/
|
|
120
|
-
declare const
|
|
120
|
+
declare const ESLintReactSettingsSchema: valibot.ObjectSchema<{
|
|
121
121
|
readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
122
122
|
readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
123
123
|
readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
@@ -254,6 +254,7 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
|
|
|
254
254
|
}, undefined>, never>;
|
|
255
255
|
}, undefined>, never>;
|
|
256
256
|
/**
|
|
257
|
+
* @internal
|
|
257
258
|
* @deprecated
|
|
258
259
|
*/
|
|
259
260
|
readonly reactOptions: valibot.OptionalSchema<valibot.ObjectSchema<{
|
|
@@ -326,9 +327,10 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
|
|
|
326
327
|
type CustomHook = InferOutput<typeof CustomHookSchema>;
|
|
327
328
|
type CustomAttribute = InferOutput<typeof CustomAttributeSchema>;
|
|
328
329
|
type CustomComponent = InferOutput<typeof CustomComponentSchema>;
|
|
329
|
-
type
|
|
330
|
+
type ESLintReactSettings = InferOutput<typeof ESLintReactSettingsSchema>;
|
|
330
331
|
type ESLintSettings = InferOutput<typeof ESLintSettingsSchema>;
|
|
331
332
|
|
|
332
333
|
declare function parseESLintSettings(data: unknown): ESLintSettings;
|
|
334
|
+
declare const DEFAULT_ESLINT_REACT_SETTINGS: ESLintReactSettings;
|
|
333
335
|
|
|
334
|
-
export { type CustomAttribute, CustomAttributeSchema, type CustomComponent, CustomComponentSchema, type CustomHook, CustomHookSchema, type
|
|
336
|
+
export { type CustomAttribute, CustomAttributeSchema, type CustomComponent, CustomComponentSchema, type CustomHook, CustomHookSchema, DEFAULT_ESLINT_REACT_SETTINGS, 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, parseESLintSettings };
|
package/dist/index.js
CHANGED
|
@@ -515,7 +515,7 @@ var CustomComponentSchema = object({
|
|
|
515
515
|
*/
|
|
516
516
|
attributes: optional(array(CustomAttributeSchema))
|
|
517
517
|
});
|
|
518
|
-
var
|
|
518
|
+
var ESLintReactSettingsSchema = object({
|
|
519
519
|
importSource: optional(string()),
|
|
520
520
|
jsxPragma: optional(string()),
|
|
521
521
|
jsxPragmaFrag: optional(string()),
|
|
@@ -544,22 +544,44 @@ var ESLintReactXSettingsSchema = object({
|
|
|
544
544
|
}))
|
|
545
545
|
});
|
|
546
546
|
var ESLintSettingsSchema = object({
|
|
547
|
-
"react-x": optional(
|
|
547
|
+
"react-x": optional(ESLintReactSettingsSchema),
|
|
548
548
|
/**
|
|
549
|
+
* @internal
|
|
549
550
|
* @deprecated
|
|
550
551
|
*/
|
|
551
|
-
reactOptions: optional(
|
|
552
|
+
reactOptions: optional(ESLintReactSettingsSchema)
|
|
552
553
|
});
|
|
553
554
|
|
|
554
555
|
// src/settings.ts
|
|
555
556
|
function parseESLintSettings(data) {
|
|
556
557
|
return parse(ESLintSettingsSchema, data);
|
|
557
558
|
}
|
|
559
|
+
var DEFAULT_ESLINT_REACT_SETTINGS = {
|
|
560
|
+
additionalComponents: [
|
|
561
|
+
{
|
|
562
|
+
name: "Link",
|
|
563
|
+
as: "a",
|
|
564
|
+
attributes: [
|
|
565
|
+
{
|
|
566
|
+
name: "to",
|
|
567
|
+
as: "href"
|
|
568
|
+
}
|
|
569
|
+
]
|
|
570
|
+
}
|
|
571
|
+
],
|
|
572
|
+
additionalHooks: {
|
|
573
|
+
useLayoutEffect: [
|
|
574
|
+
"useIsomorphicLayoutEffect"
|
|
575
|
+
]
|
|
576
|
+
},
|
|
577
|
+
version: "detect"
|
|
578
|
+
};
|
|
558
579
|
|
|
559
580
|
exports.CustomAttributeSchema = CustomAttributeSchema;
|
|
560
581
|
exports.CustomComponentSchema = CustomComponentSchema;
|
|
561
582
|
exports.CustomHookSchema = CustomHookSchema;
|
|
562
|
-
exports.
|
|
583
|
+
exports.DEFAULT_ESLINT_REACT_SETTINGS = DEFAULT_ESLINT_REACT_SETTINGS;
|
|
584
|
+
exports.ESLintReactSettingsSchema = ESLintReactSettingsSchema;
|
|
563
585
|
exports.ESLintSettingsSchema = ESLintSettingsSchema;
|
|
564
586
|
exports.GITHUB_URL = GITHUB_URL;
|
|
565
587
|
exports.HOST_HTML_COMPONENT_TYPES = HOST_HTML_COMPONENT_TYPES;
|
package/dist/index.mjs
CHANGED
|
@@ -513,7 +513,7 @@ var CustomComponentSchema = object({
|
|
|
513
513
|
*/
|
|
514
514
|
attributes: optional(array(CustomAttributeSchema))
|
|
515
515
|
});
|
|
516
|
-
var
|
|
516
|
+
var ESLintReactSettingsSchema = object({
|
|
517
517
|
importSource: optional(string()),
|
|
518
518
|
jsxPragma: optional(string()),
|
|
519
519
|
jsxPragmaFrag: optional(string()),
|
|
@@ -542,16 +542,37 @@ var ESLintReactXSettingsSchema = object({
|
|
|
542
542
|
}))
|
|
543
543
|
});
|
|
544
544
|
var ESLintSettingsSchema = object({
|
|
545
|
-
"react-x": optional(
|
|
545
|
+
"react-x": optional(ESLintReactSettingsSchema),
|
|
546
546
|
/**
|
|
547
|
+
* @internal
|
|
547
548
|
* @deprecated
|
|
548
549
|
*/
|
|
549
|
-
reactOptions: optional(
|
|
550
|
+
reactOptions: optional(ESLintReactSettingsSchema)
|
|
550
551
|
});
|
|
551
552
|
|
|
552
553
|
// src/settings.ts
|
|
553
554
|
function parseESLintSettings(data) {
|
|
554
555
|
return parse(ESLintSettingsSchema, data);
|
|
555
556
|
}
|
|
557
|
+
var DEFAULT_ESLINT_REACT_SETTINGS = {
|
|
558
|
+
additionalComponents: [
|
|
559
|
+
{
|
|
560
|
+
name: "Link",
|
|
561
|
+
as: "a",
|
|
562
|
+
attributes: [
|
|
563
|
+
{
|
|
564
|
+
name: "to",
|
|
565
|
+
as: "href"
|
|
566
|
+
}
|
|
567
|
+
]
|
|
568
|
+
}
|
|
569
|
+
],
|
|
570
|
+
additionalHooks: {
|
|
571
|
+
useLayoutEffect: [
|
|
572
|
+
"useIsomorphicLayoutEffect"
|
|
573
|
+
]
|
|
574
|
+
},
|
|
575
|
+
version: "detect"
|
|
576
|
+
};
|
|
556
577
|
|
|
557
|
-
export { CustomAttributeSchema, CustomComponentSchema, CustomHookSchema,
|
|
578
|
+
export { CustomAttributeSchema, CustomComponentSchema, CustomHookSchema, DEFAULT_ESLINT_REACT_SETTINGS, 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, parseESLintSettings };
|