@eslint-react/kit 2.0.0-next.4 → 2.0.0-next.43

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
@@ -1,7 +1,7 @@
1
+ import * as typescript from 'typescript';
1
2
  import * as tseslint from '@typescript-eslint/utils/ts-eslint';
2
3
  import { ReportDescriptor } from '@typescript-eslint/utils/ts-eslint';
3
- import { CompilerOptions, JsxEmit } from 'typescript';
4
- import * as z from '@zod/mini';
4
+ import { z } from 'zod/v4';
5
5
  import { _ } from '@eslint-react/eff';
6
6
  import { TSESTree } from '@typescript-eslint/utils';
7
7
 
@@ -31,8 +31,22 @@ type RuleContext<MessageIds extends string = string, Options extends readonly un
31
31
  * @since 1.20.0
32
32
  */
33
33
  type RuleFeature = "CFG" | "DBG" | "FIX" | "MOD" | "TSC" | "EXP";
34
+ type RulePolicy = number;
34
35
 
35
- type JsxConfig = Pick<CompilerOptions, "reactNamespace" | "jsx" | "jsxFactory" | "jsxFragmentFactory" | "jsxImportSource">;
36
+ declare const JsxEmit: {
37
+ readonly None: 0;
38
+ readonly Preserve: 1;
39
+ readonly React: 2;
40
+ readonly ReactNative: 3;
41
+ readonly ReactJSX: 4;
42
+ readonly ReactJSXDev: 5;
43
+ };
44
+ interface JsxConfig {
45
+ jsx?: number;
46
+ jsxFactory?: string;
47
+ jsxFragmentFactory?: string;
48
+ jsxImportSource?: string;
49
+ }
36
50
  /**
37
51
  * Create a JsxConfig object
38
52
  * @returns JsxConfig
@@ -44,7 +58,7 @@ declare function make$2(): JsxConfig;
44
58
  * @returns JsxConfig
45
59
  */
46
60
  declare function getFromContext$1(context: RuleContext): {
47
- jsx: JsxEmit;
61
+ jsx: 4 | typescript.JsxEmit;
48
62
  jsxFactory: string;
49
63
  jsxFragmentFactory: string;
50
64
  jsxImportSource: string;
@@ -58,22 +72,23 @@ declare function getFromContext$1(context: RuleContext): {
58
72
  declare function getFromAnnotation(context: RuleContext): JsxConfig;
59
73
 
60
74
  type index$1_JsxConfig = JsxConfig;
75
+ declare const index$1_JsxEmit: typeof JsxEmit;
61
76
  declare const index$1_getFromAnnotation: typeof getFromAnnotation;
62
77
  declare namespace index$1 {
63
- export { type index$1_JsxConfig as JsxConfig, index$1_getFromAnnotation as getFromAnnotation, getFromContext$1 as getFromContext, make$2 as make };
78
+ export { type index$1_JsxConfig as JsxConfig, index$1_JsxEmit as JsxEmit, index$1_getFromAnnotation as getFromAnnotation, getFromContext$1 as getFromContext, make$2 as make };
64
79
  }
65
80
 
66
81
  /**
67
82
  * @internal
68
83
  */
69
- declare const LanguagePreferenceSchema: z.ZodMiniObject<{
70
- indentStyle: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"tab">, z.ZodMiniLiteral<"space">]>>;
71
- indentWidth: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
72
- quoteStyle: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"single">, z.ZodMiniLiteral<"double">]>>;
73
- semicolons: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"always">, z.ZodMiniLiteral<"asNeeded">]>>;
74
- trailingCommas: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"all">, z.ZodMiniLiteral<"es5">, z.ZodMiniLiteral<"none">]>>;
75
- jsxQuoteStyle: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"single">, z.ZodMiniLiteral<"double">]>>;
76
- }, {}>;
84
+ declare const LanguagePreferenceSchema: z.ZodObject<{
85
+ indentStyle: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"tab">, z.ZodLiteral<"space">]>>;
86
+ indentWidth: z.ZodOptional<z.ZodNumber>;
87
+ quoteStyle: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"single">, z.ZodLiteral<"double">]>>;
88
+ semicolons: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"always">, z.ZodLiteral<"asNeeded">]>>;
89
+ trailingCommas: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodLiteral<"es5">, z.ZodLiteral<"none">]>>;
90
+ jsxQuoteStyle: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"single">, z.ZodLiteral<"double">]>>;
91
+ }, z.core.$strip>;
77
92
 
78
93
  /**
79
94
  * @internal
@@ -83,6 +98,17 @@ type LanguagePreference = z.infer<typeof LanguagePreferenceSchema>;
83
98
  * Get a copy of the default LanguagePreference.
84
99
  */
85
100
  declare function make$1(): LanguagePreference;
101
+ /**
102
+ * A default LanguagePreference object.
103
+ */
104
+ declare const defaultLanguagePreference: {
105
+ indentStyle?: "tab" | "space" | undefined;
106
+ indentWidth?: number | undefined;
107
+ quoteStyle?: "single" | "double" | undefined;
108
+ semicolons?: "always" | "asNeeded" | undefined;
109
+ trailingCommas?: "all" | "es5" | "none" | undefined;
110
+ jsxQuoteStyle?: "single" | "double" | undefined;
111
+ };
86
112
  declare function getFromContext(): void;
87
113
  declare module "@typescript-eslint/utils/ts-eslint" {
88
114
  interface SharedConfigurationSettings {
@@ -91,9 +117,10 @@ declare module "@typescript-eslint/utils/ts-eslint" {
91
117
 
92
118
  type index_LanguagePreference = LanguagePreference;
93
119
  declare const index_LanguagePreferenceSchema: typeof LanguagePreferenceSchema;
120
+ declare const index_defaultLanguagePreference: typeof defaultLanguagePreference;
94
121
  declare const index_getFromContext: typeof getFromContext;
95
122
  declare namespace index {
96
- export { type index_LanguagePreference as LanguagePreference, index_LanguagePreferenceSchema as LanguagePreferenceSchema, index_getFromContext as getFromContext, make$1 as make };
123
+ export { type index_LanguagePreference as LanguagePreference, index_LanguagePreferenceSchema as LanguagePreferenceSchema, index_defaultLanguagePreference as defaultLanguagePreference, index_getFromContext as getFromContext, make$1 as make };
97
124
  }
98
125
 
99
126
  /**
@@ -260,4 +287,4 @@ declare namespace Selector {
260
287
  export { Selector_DISPLAY_NAME_ASSIGNMENT_EXPRESSION as DISPLAY_NAME_ASSIGNMENT_EXPRESSION, type Selector_DisplayNameAssignmentExpression as DisplayNameAssignmentExpression, Selector_IMPLICIT_RETURN_ARROW_FUNCTION_EXPRESSION as IMPLICIT_RETURN_ARROW_FUNCTION_EXPRESSION, type Selector_ImplicitReturnArrowFunctionExpression as ImplicitReturnArrowFunctionExpression, Selector_OBJECT_DESTRUCTURING_VARIABLE_DECLARATOR as OBJECT_DESTRUCTURING_VARIABLE_DECLARATOR, type Selector_ObjectDestructuringVariableDeclarator as ObjectDestructuringVariableDeclarator };
261
288
  }
262
289
 
263
- export { index$1 as JsxConfig, index as LanguagePreference, RegExp$1 as RegExp, Reporter$1 as Reporter, type RuleContext, type RuleDeclaration, type RuleFeature, type RulePreset, type RuleSeverity, Selector };
290
+ export { index$1 as JsxConfig, index as LanguagePreference, RegExp$1 as RegExp, Reporter$1 as Reporter, type RuleContext, type RuleDeclaration, type RuleFeature, type RulePolicy, type RulePreset, type RuleSeverity, Selector };
package/dist/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { dual, getOrElseUpdate } from '@eslint-react/eff';
2
- import { JsxEmit } from 'typescript';
3
- import * as z from '@zod/mini';
2
+ import { z } from 'zod/v4';
4
3
 
5
4
  var __defProp = Object.defineProperty;
6
5
  var __export = (target, all) => {
@@ -11,6 +10,7 @@ var __export = (target, all) => {
11
10
  // src/JsxConfig/index.ts
12
11
  var JsxConfig_exports = {};
13
12
  __export(JsxConfig_exports, {
13
+ JsxEmit: () => JsxEmit,
14
14
  getFromAnnotation: () => getFromAnnotation,
15
15
  getFromContext: () => getFromContext,
16
16
  make: () => make
@@ -68,6 +68,14 @@ function isRegExp(string) {
68
68
  }
69
69
 
70
70
  // src/JsxConfig/JsxConfig.ts
71
+ var JsxEmit = {
72
+ None: 0,
73
+ Preserve: 1,
74
+ React: 2,
75
+ ReactNative: 3,
76
+ ReactJSX: 4,
77
+ ReactJSXDev: 5
78
+ };
71
79
  function make() {
72
80
  return {};
73
81
  }
@@ -110,6 +118,7 @@ function getFromAnnotation(context) {
110
118
  var LanguagePreference_exports = {};
111
119
  __export(LanguagePreference_exports, {
112
120
  LanguagePreferenceSchema: () => LanguagePreferenceSchema,
121
+ defaultLanguagePreference: () => defaultLanguagePreference,
113
122
  getFromContext: () => getFromContext2,
114
123
  make: () => make2
115
124
  });
@@ -125,6 +134,7 @@ function make2() {
125
134
  trailingCommas: "all"
126
135
  };
127
136
  }
137
+ var defaultLanguagePreference = make2();
128
138
  function getFromContext2() {
129
139
  throw new Error("getFromContext is not implemented");
130
140
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/kit",
3
- "version": "2.0.0-next.4",
3
+ "version": "2.0.0-next.43",
4
4
  "description": "ESLint React's plugin kit for building plugins and rules.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -27,15 +27,15 @@
27
27
  "./package.json"
28
28
  ],
29
29
  "dependencies": {
30
- "@typescript-eslint/utils": "^8.30.1",
31
- "@zod/mini": "^4.0.0-beta.20250418T073619",
32
- "ts-pattern": "^5.7.0",
33
- "@eslint-react/eff": "2.0.0-next.4"
30
+ "@typescript-eslint/utils": "^8.34.0",
31
+ "ts-pattern": "^5.7.1",
32
+ "zod": "^3.25.63",
33
+ "@eslint-react/eff": "2.0.0-next.43"
34
34
  },
35
35
  "devDependencies": {
36
- "@tsconfig/node22": "^22.0.1",
37
- "tsup": "^8.4.0",
38
- "type-fest": "^4.40.0",
36
+ "@tsconfig/node22": "^22.0.2",
37
+ "tsup": "^8.5.0",
38
+ "type-fest": "^4.41.0",
39
39
  "@local/configs": "0.0.0"
40
40
  },
41
41
  "engines": {