@eslint-react/shared 3.0.0-next.17 → 3.0.0-next.19

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 CHANGED
@@ -104,7 +104,7 @@ interface CompatibleConfig {
104
104
  /** Shared settings. */
105
105
  settings?: SettingsConfig;
106
106
  }
107
- type CompilationMode = "off" | "infer" | "annotation" | "syntax" | "all";
107
+ type CompilationMode = "infer" | "annotation" | "syntax" | "all";
108
108
  //#endregion
109
109
  //#region src/config-adapters.d.ts
110
110
  /**
@@ -286,7 +286,6 @@ declare function report(context: RuleContext): (descriptor?: null | ReportDescri
286
286
  declare const ESLintReactSettingsSchema: z.ZodObject<{
287
287
  importSource: z.ZodOptional<z.ZodString>;
288
288
  compilationMode: z.ZodOptional<z.ZodEnum<{
289
- off: "off";
290
289
  infer: "infer";
291
290
  annotation: "annotation";
292
291
  syntax: "syntax";
@@ -317,7 +316,7 @@ type ESLintReactSettings = z.infer<typeof ESLintReactSettingsSchema>;
317
316
  interface ESLintReactSettingsNormalized {
318
317
  version: string;
319
318
  importSource: string;
320
- compilationMode: CompilationMode;
319
+ compilationMode: CompilationMode | "off";
321
320
  polymorphicPropName: string | unit;
322
321
  additionalStateHooks: RegExpLike;
323
322
  }
@@ -327,7 +326,6 @@ interface ESLintReactSettingsNormalized {
327
326
  declare const DEFAULT_ESLINT_REACT_SETTINGS: {
328
327
  readonly version: "detect";
329
328
  readonly importSource: "react";
330
- readonly compilationMode: "annotation";
331
329
  readonly polymorphicPropName: "as";
332
330
  };
333
331
  /**
@@ -337,7 +335,6 @@ declare const DEFAULT_ESLINT_SETTINGS: {
337
335
  readonly "react-x": {
338
336
  readonly version: "detect";
339
337
  readonly importSource: "react";
340
- readonly compilationMode: "annotation";
341
338
  readonly polymorphicPropName: "as";
342
339
  };
343
340
  };
package/dist/index.js CHANGED
@@ -498,7 +498,6 @@ function report(context) {
498
498
  const ESLintReactSettingsSchema = z.object({
499
499
  importSource: z.optional(z.string()),
500
500
  compilationMode: z.optional(z.enum([
501
- "off",
502
501
  "infer",
503
502
  "annotation",
504
503
  "syntax",
@@ -519,7 +518,6 @@ const ESLintSettingsSchema = z.optional(z.object({ "react-x": z.optional(z.unkno
519
518
  const DEFAULT_ESLINT_REACT_SETTINGS = {
520
519
  version: "detect",
521
520
  importSource: "react",
522
- compilationMode: "annotation",
523
521
  polymorphicPropName: "as"
524
522
  };
525
523
  /**
@@ -574,11 +572,11 @@ const decodeSettings = (settings) => {
574
572
  * Normalizes ESLint React settings to a consistent internal format
575
573
  * Transforms component definitions and resolves version information
576
574
  */
577
- const normalizeSettings = ({ importSource = "react", compilationMode = "annotation", polymorphicPropName = "as", version, additionalStateHooks, ...rest }) => {
575
+ const normalizeSettings = ({ importSource = "react", compilationMode, polymorphicPropName = "as", version, additionalStateHooks, ...rest }) => {
578
576
  return {
579
577
  ...rest,
580
578
  importSource,
581
- compilationMode,
579
+ compilationMode: compilationMode ?? "off",
582
580
  polymorphicPropName,
583
581
  version: match(version).with(P.union(P.nullish, "", "detect"), () => getReactVersion("19.2.4")).otherwise(identity),
584
582
  additionalStateHooks: toRegExp(additionalStateHooks)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/shared",
3
- "version": "3.0.0-next.17",
3
+ "version": "3.0.0-next.19",
4
4
  "description": "ESLint React's Shared constants and functions.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -33,7 +33,7 @@
33
33
  "@typescript-eslint/utils": "canary",
34
34
  "ts-pattern": "^5.9.0",
35
35
  "zod": "^3.25.0 || ^4.0.0",
36
- "@eslint-react/eff": "3.0.0-next.17"
36
+ "@eslint-react/eff": "3.0.0-next.19"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@tsconfig/node24": "^24.0.4",