@eslint-react/shared 1.12.4-beta.1 → 1.12.4-next.0
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 +7 -12
- package/dist/index.d.ts +7 -12
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1364,7 +1364,7 @@ declare const CustomComponentSchema: ObjectSchema<{
|
|
|
1364
1364
|
* `"/"`
|
|
1365
1365
|
*/
|
|
1366
1366
|
readonly defaultValue: OptionalSchema<StringSchema<undefined>, never>;
|
|
1367
|
-
}, undefined>, undefined>,
|
|
1367
|
+
}, undefined>, undefined>, readonly []>;
|
|
1368
1368
|
}, undefined>;
|
|
1369
1369
|
declare const CustomComponentNormalizedSchema: ObjectSchema<{
|
|
1370
1370
|
readonly name: StringSchema<undefined>;
|
|
@@ -1495,7 +1495,7 @@ declare const ESLintReactSettingsSchema: ObjectSchema<{
|
|
|
1495
1495
|
* `"/"`
|
|
1496
1496
|
*/
|
|
1497
1497
|
readonly defaultValue: OptionalSchema<StringSchema<undefined>, never>;
|
|
1498
|
-
}, undefined>, undefined>,
|
|
1498
|
+
}, undefined>, undefined>, readonly []>;
|
|
1499
1499
|
}, undefined>, undefined>, never>;
|
|
1500
1500
|
/**
|
|
1501
1501
|
* A object of aliases for React built-in hooks.
|
|
@@ -1621,7 +1621,7 @@ declare const ESLintSettingsSchema: OptionalSchema<ObjectSchema<{
|
|
|
1621
1621
|
* `"/"`
|
|
1622
1622
|
*/
|
|
1623
1623
|
readonly defaultValue: OptionalSchema<StringSchema<undefined>, never>;
|
|
1624
|
-
}, undefined>, undefined>,
|
|
1624
|
+
}, undefined>, undefined>, readonly []>;
|
|
1625
1625
|
}, undefined>, undefined>, never>;
|
|
1626
1626
|
/**
|
|
1627
1627
|
* A object of aliases for React built-in hooks.
|
|
@@ -1744,7 +1744,7 @@ declare const ESLintSettingsSchema: OptionalSchema<ObjectSchema<{
|
|
|
1744
1744
|
* `"/"`
|
|
1745
1745
|
*/
|
|
1746
1746
|
readonly defaultValue: OptionalSchema<StringSchema<undefined>, never>;
|
|
1747
|
-
}, undefined>, undefined>,
|
|
1747
|
+
}, undefined>, undefined>, readonly []>;
|
|
1748
1748
|
}, undefined>, undefined>, never>;
|
|
1749
1749
|
/**
|
|
1750
1750
|
* A object of aliases for React built-in hooks.
|
|
@@ -2055,14 +2055,14 @@ declare const decodeSettings: Memoized<(data: unknown) => {
|
|
|
2055
2055
|
readonly version?: string;
|
|
2056
2056
|
readonly additionalComponents?: {
|
|
2057
2057
|
name: string;
|
|
2058
|
-
|
|
2059
|
-
selector?: string;
|
|
2060
|
-
attributes?: {
|
|
2058
|
+
attributes: {
|
|
2061
2059
|
name: string;
|
|
2062
2060
|
as?: string;
|
|
2063
2061
|
controlled?: boolean;
|
|
2064
2062
|
defaultValue?: string;
|
|
2065
2063
|
}[];
|
|
2064
|
+
as?: string;
|
|
2065
|
+
selector?: string;
|
|
2066
2066
|
}[];
|
|
2067
2067
|
readonly additionalHooks?: {
|
|
2068
2068
|
use?: string[];
|
|
@@ -2129,10 +2129,5 @@ declare function findAttrInCustomAttributes(name: string, attributes: CustomAttr
|
|
|
2129
2129
|
* @returns The settings.
|
|
2130
2130
|
*/
|
|
2131
2131
|
declare const defineSettings: (settings: ESLintReactSettings) => ESLintReactSettings;
|
|
2132
|
-
declare module "@typescript-eslint/utils/ts-eslint" {
|
|
2133
|
-
interface SharedConfigurationSettings {
|
|
2134
|
-
"react-x"?: Partial<ESLintReactSettings>;
|
|
2135
|
-
}
|
|
2136
|
-
}
|
|
2137
2132
|
|
|
2138
2133
|
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, INITIAL_ESLINT_REACT_SETTINGS, 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, findAttrInCustomAttributes, normalizeSettings, unsafeReadSettings };
|
package/dist/index.d.ts
CHANGED
|
@@ -1364,7 +1364,7 @@ declare const CustomComponentSchema: ObjectSchema<{
|
|
|
1364
1364
|
* `"/"`
|
|
1365
1365
|
*/
|
|
1366
1366
|
readonly defaultValue: OptionalSchema<StringSchema<undefined>, never>;
|
|
1367
|
-
}, undefined>, undefined>,
|
|
1367
|
+
}, undefined>, undefined>, readonly []>;
|
|
1368
1368
|
}, undefined>;
|
|
1369
1369
|
declare const CustomComponentNormalizedSchema: ObjectSchema<{
|
|
1370
1370
|
readonly name: StringSchema<undefined>;
|
|
@@ -1495,7 +1495,7 @@ declare const ESLintReactSettingsSchema: ObjectSchema<{
|
|
|
1495
1495
|
* `"/"`
|
|
1496
1496
|
*/
|
|
1497
1497
|
readonly defaultValue: OptionalSchema<StringSchema<undefined>, never>;
|
|
1498
|
-
}, undefined>, undefined>,
|
|
1498
|
+
}, undefined>, undefined>, readonly []>;
|
|
1499
1499
|
}, undefined>, undefined>, never>;
|
|
1500
1500
|
/**
|
|
1501
1501
|
* A object of aliases for React built-in hooks.
|
|
@@ -1621,7 +1621,7 @@ declare const ESLintSettingsSchema: OptionalSchema<ObjectSchema<{
|
|
|
1621
1621
|
* `"/"`
|
|
1622
1622
|
*/
|
|
1623
1623
|
readonly defaultValue: OptionalSchema<StringSchema<undefined>, never>;
|
|
1624
|
-
}, undefined>, undefined>,
|
|
1624
|
+
}, undefined>, undefined>, readonly []>;
|
|
1625
1625
|
}, undefined>, undefined>, never>;
|
|
1626
1626
|
/**
|
|
1627
1627
|
* A object of aliases for React built-in hooks.
|
|
@@ -1744,7 +1744,7 @@ declare const ESLintSettingsSchema: OptionalSchema<ObjectSchema<{
|
|
|
1744
1744
|
* `"/"`
|
|
1745
1745
|
*/
|
|
1746
1746
|
readonly defaultValue: OptionalSchema<StringSchema<undefined>, never>;
|
|
1747
|
-
}, undefined>, undefined>,
|
|
1747
|
+
}, undefined>, undefined>, readonly []>;
|
|
1748
1748
|
}, undefined>, undefined>, never>;
|
|
1749
1749
|
/**
|
|
1750
1750
|
* A object of aliases for React built-in hooks.
|
|
@@ -2055,14 +2055,14 @@ declare const decodeSettings: Memoized<(data: unknown) => {
|
|
|
2055
2055
|
readonly version?: string;
|
|
2056
2056
|
readonly additionalComponents?: {
|
|
2057
2057
|
name: string;
|
|
2058
|
-
|
|
2059
|
-
selector?: string;
|
|
2060
|
-
attributes?: {
|
|
2058
|
+
attributes: {
|
|
2061
2059
|
name: string;
|
|
2062
2060
|
as?: string;
|
|
2063
2061
|
controlled?: boolean;
|
|
2064
2062
|
defaultValue?: string;
|
|
2065
2063
|
}[];
|
|
2064
|
+
as?: string;
|
|
2065
|
+
selector?: string;
|
|
2066
2066
|
}[];
|
|
2067
2067
|
readonly additionalHooks?: {
|
|
2068
2068
|
use?: string[];
|
|
@@ -2129,10 +2129,5 @@ declare function findAttrInCustomAttributes(name: string, attributes: CustomAttr
|
|
|
2129
2129
|
* @returns The settings.
|
|
2130
2130
|
*/
|
|
2131
2131
|
declare const defineSettings: (settings: ESLintReactSettings) => ESLintReactSettings;
|
|
2132
|
-
declare module "@typescript-eslint/utils/ts-eslint" {
|
|
2133
|
-
interface SharedConfigurationSettings {
|
|
2134
|
-
"react-x"?: Partial<ESLintReactSettings>;
|
|
2135
|
-
}
|
|
2136
|
-
}
|
|
2137
2132
|
|
|
2138
2133
|
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, INITIAL_ESLINT_REACT_SETTINGS, 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, findAttrInCustomAttributes, normalizeSettings, unsafeReadSettings };
|
package/dist/index.js
CHANGED
|
@@ -567,7 +567,7 @@ var CustomComponentSchema = object({
|
|
|
567
567
|
* @example
|
|
568
568
|
* `Link` component has a `to` attribute that represents the `href` attribute in the built-in `a` element with a default value of `"/"`.
|
|
569
569
|
*/
|
|
570
|
-
attributes: optional(array(CustomAttributeSchema))
|
|
570
|
+
attributes: optional(array(CustomAttributeSchema), [])
|
|
571
571
|
});
|
|
572
572
|
var CustomComponentNormalizedSchema = object({
|
|
573
573
|
name: string(),
|
|
@@ -1322,14 +1322,14 @@ var normalizeSettings = createMemoizedFunction((settings) => {
|
|
|
1322
1322
|
...settings,
|
|
1323
1323
|
additionalComponents: additionalComponents.map((component) => ({
|
|
1324
1324
|
...component,
|
|
1325
|
-
attributes: component.attributes
|
|
1325
|
+
attributes: component.attributes.map((attr) => ({
|
|
1326
1326
|
...attr,
|
|
1327
1327
|
as: attr.as ?? attr.name
|
|
1328
|
-
}))
|
|
1328
|
+
})),
|
|
1329
1329
|
re: pm__default.default.makeRe(component.name, { fastpaths: true })
|
|
1330
1330
|
})),
|
|
1331
1331
|
components: additionalComponents.reduce((acc, component) => {
|
|
1332
|
-
const { name, as, attributes
|
|
1332
|
+
const { name, as, attributes, selector } = component;
|
|
1333
1333
|
if (!name || !as || selector || attributes.length > 0) return acc;
|
|
1334
1334
|
if (!/^[\w-]+$/u.test(name)) return acc;
|
|
1335
1335
|
return acc.set(name, as);
|
package/dist/index.mjs
CHANGED
|
@@ -561,7 +561,7 @@ var CustomComponentSchema = object({
|
|
|
561
561
|
* @example
|
|
562
562
|
* `Link` component has a `to` attribute that represents the `href` attribute in the built-in `a` element with a default value of `"/"`.
|
|
563
563
|
*/
|
|
564
|
-
attributes: optional(array(CustomAttributeSchema))
|
|
564
|
+
attributes: optional(array(CustomAttributeSchema), [])
|
|
565
565
|
});
|
|
566
566
|
var CustomComponentNormalizedSchema = object({
|
|
567
567
|
name: string(),
|
|
@@ -1316,14 +1316,14 @@ var normalizeSettings = createMemoizedFunction((settings) => {
|
|
|
1316
1316
|
...settings,
|
|
1317
1317
|
additionalComponents: additionalComponents.map((component) => ({
|
|
1318
1318
|
...component,
|
|
1319
|
-
attributes: component.attributes
|
|
1319
|
+
attributes: component.attributes.map((attr) => ({
|
|
1320
1320
|
...attr,
|
|
1321
1321
|
as: attr.as ?? attr.name
|
|
1322
|
-
}))
|
|
1322
|
+
})),
|
|
1323
1323
|
re: pm.makeRe(component.name, { fastpaths: true })
|
|
1324
1324
|
})),
|
|
1325
1325
|
components: additionalComponents.reduce((acc, component) => {
|
|
1326
|
-
const { name, as, attributes
|
|
1326
|
+
const { name, as, attributes, selector } = component;
|
|
1327
1327
|
if (!name || !as || selector || attributes.length > 0) return acc;
|
|
1328
1328
|
if (!/^[\w-]+$/u.test(name)) return acc;
|
|
1329
1329
|
return acc.set(name, as);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/shared",
|
|
3
|
-
"version": "1.12.4-
|
|
3
|
+
"version": "1.12.4-next.0",
|
|
4
4
|
"description": "ESLint React's Shared constants and functions.",
|
|
5
5
|
"homepage": "https://github.com/rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@typescript-eslint/utils": "^8.3.0",
|
|
39
39
|
"picomatch": "^4.0.2",
|
|
40
|
-
"@eslint-react/tools": "1.12.4-
|
|
40
|
+
"@eslint-react/tools": "1.12.4-next.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/picomatch": "^3.0.1",
|