@eslint-react/shared 3.0.0-next.23 → 3.0.0-next.24
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.ts +4 -0
- package/dist/index.js +5 -3
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -294,6 +294,7 @@ declare const ESLintReactSettingsSchema: z.ZodObject<{
|
|
|
294
294
|
polymorphicPropName: z.ZodOptional<z.ZodString>;
|
|
295
295
|
version: z.ZodOptional<z.ZodString>;
|
|
296
296
|
additionalStateHooks: z.ZodOptional<z.ZodString>;
|
|
297
|
+
additionalEffectHooks: z.ZodOptional<z.ZodString>;
|
|
297
298
|
}, z.core.$strip>;
|
|
298
299
|
/**
|
|
299
300
|
* Schema for ESLint settings
|
|
@@ -319,6 +320,7 @@ interface ESLintReactSettingsNormalized {
|
|
|
319
320
|
compilationMode: CompilationMode | "off";
|
|
320
321
|
polymorphicPropName: string | unit;
|
|
321
322
|
additionalStateHooks: RegExpLike;
|
|
323
|
+
additionalEffectHooks: RegExpLike;
|
|
322
324
|
}
|
|
323
325
|
/**
|
|
324
326
|
* Default ESLint React settings
|
|
@@ -378,6 +380,7 @@ declare const normalizeSettings: ({
|
|
|
378
380
|
polymorphicPropName,
|
|
379
381
|
version,
|
|
380
382
|
additionalStateHooks,
|
|
383
|
+
additionalEffectHooks,
|
|
381
384
|
...rest
|
|
382
385
|
}: ESLintReactSettings) => {
|
|
383
386
|
readonly importSource: string;
|
|
@@ -385,6 +388,7 @@ declare const normalizeSettings: ({
|
|
|
385
388
|
readonly polymorphicPropName: string;
|
|
386
389
|
readonly version: string;
|
|
387
390
|
readonly additionalStateHooks: RegExpLike;
|
|
391
|
+
readonly additionalEffectHooks: RegExpLike;
|
|
388
392
|
};
|
|
389
393
|
/**
|
|
390
394
|
* Retrieves normalized ESLint React settings from the rule context
|
package/dist/index.js
CHANGED
|
@@ -505,7 +505,8 @@ const ESLintReactSettingsSchema = z.object({
|
|
|
505
505
|
])),
|
|
506
506
|
polymorphicPropName: z.optional(z.string()),
|
|
507
507
|
version: z.optional(z.string()),
|
|
508
|
-
additionalStateHooks: z.optional(z.string())
|
|
508
|
+
additionalStateHooks: z.optional(z.string()),
|
|
509
|
+
additionalEffectHooks: z.optional(z.string())
|
|
509
510
|
});
|
|
510
511
|
/**
|
|
511
512
|
* Schema for ESLint settings
|
|
@@ -572,14 +573,15 @@ const decodeSettings = (settings) => {
|
|
|
572
573
|
* Normalizes ESLint React settings to a consistent internal format
|
|
573
574
|
* Transforms component definitions and resolves version information
|
|
574
575
|
*/
|
|
575
|
-
const normalizeSettings = ({ importSource = "react", compilationMode, polymorphicPropName = "as", version, additionalStateHooks, ...rest }) => {
|
|
576
|
+
const normalizeSettings = ({ importSource = "react", compilationMode, polymorphicPropName = "as", version, additionalStateHooks, additionalEffectHooks, ...rest }) => {
|
|
576
577
|
return {
|
|
577
578
|
...rest,
|
|
578
579
|
importSource,
|
|
579
580
|
compilationMode: compilationMode ?? "off",
|
|
580
581
|
polymorphicPropName,
|
|
581
582
|
version: match(version).with(P.union(P.nullish, "", "detect"), () => getReactVersion("19.2.4")).otherwise(identity),
|
|
582
|
-
additionalStateHooks: toRegExp(additionalStateHooks)
|
|
583
|
+
additionalStateHooks: toRegExp(additionalStateHooks),
|
|
584
|
+
additionalEffectHooks: toRegExp(additionalEffectHooks)
|
|
583
585
|
};
|
|
584
586
|
};
|
|
585
587
|
const cache = /* @__PURE__ */ new Map();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/shared",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.24",
|
|
4
4
|
"description": "ESLint React's Shared constants and functions.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@typescript-eslint/utils": "canary",
|
|
34
34
|
"ts-pattern": "^5.9.0",
|
|
35
|
-
"zod": "^
|
|
36
|
-
"@eslint-react/eff": "3.0.0-next.
|
|
35
|
+
"zod": "^4.3.6",
|
|
36
|
+
"@eslint-react/eff": "3.0.0-next.24"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@tsconfig/node24": "^24.0.4",
|