@eslint-react/shared
Advanced tools
+32
-5
@@ -75,2 +75,31 @@ import { ESLintUtils } from '@typescript-eslint/utils'; | ||
| declare const ESLintSettingsSchema: valibot.ObjectSchema<{ | ||
| readonly "react-x": valibot.OptionalSchema<valibot.ObjectSchema<{ | ||
| readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{ | ||
| readonly use: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>; | ||
| readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| }, undefined>, never>; | ||
| readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>; | ||
| readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>; | ||
| readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>; | ||
| readonly strict: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, never>; | ||
| readonly version: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>; | ||
| }, undefined>, never>; | ||
| /** | ||
| * @deprecated | ||
| */ | ||
| readonly reactOptions: valibot.OptionalSchema<valibot.ObjectSchema<{ | ||
@@ -103,7 +132,5 @@ readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{ | ||
| }, undefined>; | ||
| type ESLintSettings = ReadonlyDeep<{ | ||
| [key: string]: unknown; | ||
| reactOptions?: ESLintReactSettings; | ||
| }>; | ||
| type ESLintSettings = ReadonlyDeep<InferOutput<typeof ESLintSettingsSchema>>; | ||
| declare function getESLintReactSettings(data: unknown): ESLintReactSettings; | ||
| 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 }; | ||
| 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 }; |
+32
-5
@@ -75,2 +75,31 @@ import { ESLintUtils } from '@typescript-eslint/utils'; | ||
| declare const ESLintSettingsSchema: valibot.ObjectSchema<{ | ||
| readonly "react-x": valibot.OptionalSchema<valibot.ObjectSchema<{ | ||
| readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{ | ||
| readonly use: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>; | ||
| readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, never>; | ||
| }, undefined>, never>; | ||
| readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>; | ||
| readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>; | ||
| readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>; | ||
| readonly strict: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, never>; | ||
| readonly version: valibot.OptionalSchema<valibot.StringSchema<undefined>, never>; | ||
| }, undefined>, never>; | ||
| /** | ||
| * @deprecated | ||
| */ | ||
| readonly reactOptions: valibot.OptionalSchema<valibot.ObjectSchema<{ | ||
@@ -103,7 +132,5 @@ readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{ | ||
| }, undefined>; | ||
| type ESLintSettings = ReadonlyDeep<{ | ||
| [key: string]: unknown; | ||
| reactOptions?: ESLintReactSettings; | ||
| }>; | ||
| type ESLintSettings = ReadonlyDeep<InferOutput<typeof ESLintSettingsSchema>>; | ||
| declare function getESLintReactSettings(data: unknown): ESLintReactSettings; | ||
| 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 }; | ||
| 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 }; |
+9
-0
@@ -219,4 +219,12 @@ 'use strict'; | ||
| var ESLintSettingsSchema = valibot.object({ | ||
| "react-x": valibot.optional(ESLintReactSettingsSchema), | ||
| /** | ||
| * @deprecated | ||
| */ | ||
| reactOptions: valibot.optional(ESLintReactSettingsSchema) | ||
| }); | ||
| function getESLintReactSettings(data) { | ||
| const settings = valibot.parse(ESLintSettingsSchema, data); | ||
| return settings["react-x"] ?? settings.reactOptions ?? {}; | ||
| } | ||
@@ -237,1 +245,2 @@ exports.ESLintReactSettingsSchema = ESLintReactSettingsSchema; | ||
| exports.createRuleForPlugin = createRuleForPlugin; | ||
| exports.getESLintReactSettings = getESLintReactSettings; |
+10
-2
| import { ESLintUtils } from '@typescript-eslint/utils'; | ||
| import { object, optional, string, array, boolean } from 'valibot'; | ||
| import { object, optional, string, array, boolean, parse } from 'valibot'; | ||
@@ -217,5 +217,13 @@ // src/constants.ts | ||
| var ESLintSettingsSchema = object({ | ||
| "react-x": optional(ESLintReactSettingsSchema), | ||
| /** | ||
| * @deprecated | ||
| */ | ||
| reactOptions: optional(ESLintReactSettingsSchema) | ||
| }); | ||
| function getESLintReactSettings(data) { | ||
| const settings = parse(ESLintSettingsSchema, data); | ||
| return settings["react-x"] ?? settings.reactOptions ?? {}; | ||
| } | ||
| 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 }; | ||
| 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 }; |
+1
-1
| { | ||
| "name": "@eslint-react/shared", | ||
| "version": "1.5.19-beta.0", | ||
| "version": "1.5.19-beta.1", | ||
| "description": "ESLint React's Shared constants and functions.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/rel1cx/eslint-react", |
37294
21.12%605
8.04%