@eslint-react/shared 1.5.31-next.2 → 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 CHANGED
@@ -117,7 +117,7 @@ declare const CustomComponentSchema: valibot.ObjectSchema<{
117
117
  /**
118
118
  * @internal
119
119
  */
120
- declare const ESLintReactXSettingsSchema: valibot.ObjectSchema<{
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>;
@@ -326,9 +326,10 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
326
326
  type CustomHook = InferOutput<typeof CustomHookSchema>;
327
327
  type CustomAttribute = InferOutput<typeof CustomAttributeSchema>;
328
328
  type CustomComponent = InferOutput<typeof CustomComponentSchema>;
329
- type ESLintReactXSettings = InferOutput<typeof ESLintReactXSettingsSchema>;
329
+ type ESLintReactSettings = InferOutput<typeof ESLintReactSettingsSchema>;
330
330
  type ESLintSettings = InferOutput<typeof ESLintSettingsSchema>;
331
331
 
332
332
  declare function parseESLintSettings(data: unknown): ESLintSettings;
333
+ declare const DEFAULT_ESLINT_REACT_SETTINGS: ESLintReactSettings;
333
334
 
334
- export { type CustomAttribute, CustomAttributeSchema, type CustomComponent, CustomComponentSchema, type CustomHook, CustomHookSchema, type ESLintReactXSettings, ESLintReactXSettingsSchema, 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 };
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
@@ -117,7 +117,7 @@ declare const CustomComponentSchema: valibot.ObjectSchema<{
117
117
  /**
118
118
  * @internal
119
119
  */
120
- declare const ESLintReactXSettingsSchema: valibot.ObjectSchema<{
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>;
@@ -326,9 +326,10 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
326
326
  type CustomHook = InferOutput<typeof CustomHookSchema>;
327
327
  type CustomAttribute = InferOutput<typeof CustomAttributeSchema>;
328
328
  type CustomComponent = InferOutput<typeof CustomComponentSchema>;
329
- type ESLintReactXSettings = InferOutput<typeof ESLintReactXSettingsSchema>;
329
+ type ESLintReactSettings = InferOutput<typeof ESLintReactSettingsSchema>;
330
330
  type ESLintSettings = InferOutput<typeof ESLintSettingsSchema>;
331
331
 
332
332
  declare function parseESLintSettings(data: unknown): ESLintSettings;
333
+ declare const DEFAULT_ESLINT_REACT_SETTINGS: ESLintReactSettings;
333
334
 
334
- export { type CustomAttribute, CustomAttributeSchema, type CustomComponent, CustomComponentSchema, type CustomHook, CustomHookSchema, type ESLintReactXSettings, ESLintReactXSettingsSchema, 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 };
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 ESLintReactXSettingsSchema = object({
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(ESLintReactXSettingsSchema),
547
+ "react-x": optional(ESLintReactSettingsSchema),
548
548
  /**
549
549
  * @deprecated
550
550
  */
551
- reactOptions: optional(ESLintReactXSettingsSchema)
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.ESLintReactXSettingsSchema = ESLintReactXSettingsSchema;
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 ESLintReactXSettingsSchema = object({
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(ESLintReactXSettingsSchema),
545
+ "react-x": optional(ESLintReactSettingsSchema),
546
546
  /**
547
547
  * @deprecated
548
548
  */
549
- reactOptions: optional(ESLintReactXSettingsSchema)
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, ESLintReactXSettingsSchema, 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 };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/shared",
3
- "version": "1.5.31-next.2",
3
+ "version": "1.5.31-next.3",
4
4
  "description": "ESLint React's Shared constants and functions.",
5
5
  "homepage": "https://github.com/rel1cx/eslint-react",
6
6
  "bugs": {