@eslint-react/shared 1.5.31-next.1 → 1.5.31-next.3
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 +8 -5
- package/dist/index.d.ts +8 -5
- package/dist/index.js +25 -4
- package/dist/index.mjs +24 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
2
|
import * as valibot from 'valibot';
|
|
3
3
|
import { InferOutput } from 'valibot';
|
|
4
|
-
import { ReadonlyDeep } from 'type-fest';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* -----------------------------------------------------------------------------
|
|
@@ -118,7 +117,7 @@ declare const CustomComponentSchema: valibot.ObjectSchema<{
|
|
|
118
117
|
/**
|
|
119
118
|
* @internal
|
|
120
119
|
*/
|
|
121
|
-
declare const
|
|
120
|
+
declare const ESLintReactSettingsSchema: valibot.ObjectSchema<{
|
|
122
121
|
readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
123
122
|
readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
124
123
|
readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
@@ -324,9 +323,13 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
|
|
|
324
323
|
}, undefined>, never>;
|
|
325
324
|
}, undefined>, never>;
|
|
326
325
|
}, undefined>;
|
|
327
|
-
type
|
|
328
|
-
type
|
|
326
|
+
type CustomHook = InferOutput<typeof CustomHookSchema>;
|
|
327
|
+
type CustomAttribute = InferOutput<typeof CustomAttributeSchema>;
|
|
328
|
+
type CustomComponent = InferOutput<typeof CustomComponentSchema>;
|
|
329
|
+
type ESLintReactSettings = InferOutput<typeof ESLintReactSettingsSchema>;
|
|
330
|
+
type ESLintSettings = InferOutput<typeof ESLintSettingsSchema>;
|
|
329
331
|
|
|
330
332
|
declare function parseESLintSettings(data: unknown): ESLintSettings;
|
|
333
|
+
declare const DEFAULT_ESLINT_REACT_SETTINGS: ESLintReactSettings;
|
|
331
334
|
|
|
332
|
-
export { CustomAttributeSchema, CustomComponentSchema, CustomHookSchema, type
|
|
335
|
+
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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
2
|
import * as valibot from 'valibot';
|
|
3
3
|
import { InferOutput } from 'valibot';
|
|
4
|
-
import { ReadonlyDeep } from 'type-fest';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* -----------------------------------------------------------------------------
|
|
@@ -118,7 +117,7 @@ declare const CustomComponentSchema: valibot.ObjectSchema<{
|
|
|
118
117
|
/**
|
|
119
118
|
* @internal
|
|
120
119
|
*/
|
|
121
|
-
declare const
|
|
120
|
+
declare const ESLintReactSettingsSchema: valibot.ObjectSchema<{
|
|
122
121
|
readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
123
122
|
readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
124
123
|
readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>;
|
|
@@ -324,9 +323,13 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
|
|
|
324
323
|
}, undefined>, never>;
|
|
325
324
|
}, undefined>, never>;
|
|
326
325
|
}, undefined>;
|
|
327
|
-
type
|
|
328
|
-
type
|
|
326
|
+
type CustomHook = InferOutput<typeof CustomHookSchema>;
|
|
327
|
+
type CustomAttribute = InferOutput<typeof CustomAttributeSchema>;
|
|
328
|
+
type CustomComponent = InferOutput<typeof CustomComponentSchema>;
|
|
329
|
+
type ESLintReactSettings = InferOutput<typeof ESLintReactSettingsSchema>;
|
|
330
|
+
type ESLintSettings = InferOutput<typeof ESLintSettingsSchema>;
|
|
329
331
|
|
|
330
332
|
declare function parseESLintSettings(data: unknown): ESLintSettings;
|
|
333
|
+
declare const DEFAULT_ESLINT_REACT_SETTINGS: ESLintReactSettings;
|
|
331
334
|
|
|
332
|
-
export { CustomAttributeSchema, CustomComponentSchema, CustomHookSchema, type
|
|
335
|
+
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,43 @@ var ESLintReactXSettingsSchema = object({
|
|
|
544
544
|
}))
|
|
545
545
|
});
|
|
546
546
|
var ESLintSettingsSchema = object({
|
|
547
|
-
"react-x": optional(
|
|
547
|
+
"react-x": optional(ESLintReactSettingsSchema),
|
|
548
548
|
/**
|
|
549
549
|
* @deprecated
|
|
550
550
|
*/
|
|
551
|
-
reactOptions: optional(
|
|
551
|
+
reactOptions: optional(ESLintReactSettingsSchema)
|
|
552
552
|
});
|
|
553
553
|
|
|
554
554
|
// src/settings.ts
|
|
555
555
|
function parseESLintSettings(data) {
|
|
556
556
|
return parse(ESLintSettingsSchema, data);
|
|
557
557
|
}
|
|
558
|
+
var DEFAULT_ESLINT_REACT_SETTINGS = {
|
|
559
|
+
additionalComponents: [
|
|
560
|
+
{
|
|
561
|
+
name: "Link",
|
|
562
|
+
as: "a",
|
|
563
|
+
attributes: [
|
|
564
|
+
{
|
|
565
|
+
name: "to",
|
|
566
|
+
as: "href"
|
|
567
|
+
}
|
|
568
|
+
]
|
|
569
|
+
}
|
|
570
|
+
],
|
|
571
|
+
additionalHooks: {
|
|
572
|
+
useLayoutEffect: [
|
|
573
|
+
"useIsomorphicLayoutEffect"
|
|
574
|
+
]
|
|
575
|
+
},
|
|
576
|
+
version: "detect"
|
|
577
|
+
};
|
|
558
578
|
|
|
559
579
|
exports.CustomAttributeSchema = CustomAttributeSchema;
|
|
560
580
|
exports.CustomComponentSchema = CustomComponentSchema;
|
|
561
581
|
exports.CustomHookSchema = CustomHookSchema;
|
|
562
|
-
exports.
|
|
582
|
+
exports.DEFAULT_ESLINT_REACT_SETTINGS = DEFAULT_ESLINT_REACT_SETTINGS;
|
|
583
|
+
exports.ESLintReactSettingsSchema = ESLintReactSettingsSchema;
|
|
563
584
|
exports.ESLintSettingsSchema = ESLintSettingsSchema;
|
|
564
585
|
exports.GITHUB_URL = GITHUB_URL;
|
|
565
586
|
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,36 @@ var ESLintReactXSettingsSchema = object({
|
|
|
542
542
|
}))
|
|
543
543
|
});
|
|
544
544
|
var ESLintSettingsSchema = object({
|
|
545
|
-
"react-x": optional(
|
|
545
|
+
"react-x": optional(ESLintReactSettingsSchema),
|
|
546
546
|
/**
|
|
547
547
|
* @deprecated
|
|
548
548
|
*/
|
|
549
|
-
reactOptions: optional(
|
|
549
|
+
reactOptions: optional(ESLintReactSettingsSchema)
|
|
550
550
|
});
|
|
551
551
|
|
|
552
552
|
// src/settings.ts
|
|
553
553
|
function parseESLintSettings(data) {
|
|
554
554
|
return parse(ESLintSettingsSchema, data);
|
|
555
555
|
}
|
|
556
|
+
var DEFAULT_ESLINT_REACT_SETTINGS = {
|
|
557
|
+
additionalComponents: [
|
|
558
|
+
{
|
|
559
|
+
name: "Link",
|
|
560
|
+
as: "a",
|
|
561
|
+
attributes: [
|
|
562
|
+
{
|
|
563
|
+
name: "to",
|
|
564
|
+
as: "href"
|
|
565
|
+
}
|
|
566
|
+
]
|
|
567
|
+
}
|
|
568
|
+
],
|
|
569
|
+
additionalHooks: {
|
|
570
|
+
useLayoutEffect: [
|
|
571
|
+
"useIsomorphicLayoutEffect"
|
|
572
|
+
]
|
|
573
|
+
},
|
|
574
|
+
version: "detect"
|
|
575
|
+
};
|
|
556
576
|
|
|
557
|
-
export { CustomAttributeSchema, CustomComponentSchema, CustomHookSchema,
|
|
577
|
+
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 };
|