@eslint-react/kit 2.0.0-next.13 → 2.0.0-next.130

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,8 +1,8 @@
1
1
  import * as typescript from 'typescript';
2
2
  import * as tseslint from '@typescript-eslint/utils/ts-eslint';
3
3
  import { ReportDescriptor } from '@typescript-eslint/utils/ts-eslint';
4
- import * as z from '@zod/mini';
5
- import { _ } from '@eslint-react/eff';
4
+ import { z } from 'zod/v4';
5
+ import { unit } from '@eslint-react/eff';
6
6
  import { TSESTree } from '@typescript-eslint/utils';
7
7
 
8
8
  /**
@@ -32,6 +32,11 @@ type RuleContext<MessageIds extends string = string, Options extends readonly un
32
32
  */
33
33
  type RuleFeature = "CFG" | "DBG" | "FIX" | "MOD" | "TSC" | "EXP";
34
34
  type RulePolicy = number;
35
+ type RuleSuggest<MessageIds extends string = string> = {
36
+ messageId: MessageIds;
37
+ data?: Record<string, unknown>;
38
+ fix: tseslint.ReportFixFunction;
39
+ };
35
40
 
36
41
  declare const JsxEmit: {
37
42
  readonly None: 0;
@@ -81,14 +86,14 @@ declare namespace index$1 {
81
86
  /**
82
87
  * @internal
83
88
  */
84
- declare const LanguagePreferenceSchema: z.ZodMiniObject<{
85
- indentStyle: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"tab">, z.ZodMiniLiteral<"space">]>>;
86
- indentWidth: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
87
- quoteStyle: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"single">, z.ZodMiniLiteral<"double">]>>;
88
- semicolons: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"always">, z.ZodMiniLiteral<"asNeeded">]>>;
89
- trailingCommas: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"all">, z.ZodMiniLiteral<"es5">, z.ZodMiniLiteral<"none">]>>;
90
- jsxQuoteStyle: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"single">, z.ZodMiniLiteral<"double">]>>;
91
- }, {}>;
89
+ declare const LanguagePreferenceSchema: z.ZodObject<{
90
+ indentStyle: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"tab">, z.ZodLiteral<"space">]>>;
91
+ indentWidth: z.ZodOptional<z.ZodNumber>;
92
+ quoteStyle: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"single">, z.ZodLiteral<"double">]>>;
93
+ semicolons: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"always">, z.ZodLiteral<"asNeeded">]>>;
94
+ trailingCommas: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodLiteral<"es5">, z.ZodLiteral<"none">]>>;
95
+ jsxQuoteStyle: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"single">, z.ZodLiteral<"double">]>>;
96
+ }, z.core.$strip>;
92
97
 
93
98
  /**
94
99
  * @internal
@@ -98,6 +103,17 @@ type LanguagePreference = z.infer<typeof LanguagePreferenceSchema>;
98
103
  * Get a copy of the default LanguagePreference.
99
104
  */
100
105
  declare function make$1(): LanguagePreference;
106
+ /**
107
+ * A default LanguagePreference object.
108
+ */
109
+ declare const defaultLanguagePreference: {
110
+ indentStyle?: "tab" | "space" | undefined;
111
+ indentWidth?: number | undefined;
112
+ quoteStyle?: "single" | "double" | undefined;
113
+ semicolons?: "always" | "asNeeded" | undefined;
114
+ trailingCommas?: "all" | "es5" | "none" | undefined;
115
+ jsxQuoteStyle?: "single" | "double" | undefined;
116
+ };
101
117
  declare function getFromContext(): void;
102
118
  declare module "@typescript-eslint/utils/ts-eslint" {
103
119
  interface SharedConfigurationSettings {
@@ -106,9 +122,10 @@ declare module "@typescript-eslint/utils/ts-eslint" {
106
122
 
107
123
  type index_LanguagePreference = LanguagePreference;
108
124
  declare const index_LanguagePreferenceSchema: typeof LanguagePreferenceSchema;
125
+ declare const index_defaultLanguagePreference: typeof defaultLanguagePreference;
109
126
  declare const index_getFromContext: typeof getFromContext;
110
127
  declare namespace index {
111
- export { type index_LanguagePreference as LanguagePreference, index_LanguagePreferenceSchema as LanguagePreferenceSchema, index_getFromContext as getFromContext, make$1 as make };
128
+ export { type index_LanguagePreference as LanguagePreference, index_LanguagePreferenceSchema as LanguagePreferenceSchema, index_defaultLanguagePreference as defaultLanguagePreference, index_getFromContext as getFromContext, make$1 as make };
112
129
  }
113
130
 
114
131
  /**
@@ -223,16 +240,16 @@ declare namespace RegExp$1 {
223
240
  }
224
241
 
225
242
  interface Reporter<TMessageID extends string> {
226
- send: (descriptor: _ | null | ReportDescriptor<TMessageID>) => void;
227
- sendOrElse: <TElse>(descriptor: _ | null | ReportDescriptor<TMessageID>, cb: () => TElse) => _ | TElse;
243
+ send: (descriptor: unit | null | ReportDescriptor<TMessageID>) => void;
244
+ sendOrElse: <TElse>(descriptor: unit | null | ReportDescriptor<TMessageID>, cb: () => TElse) => unit | TElse;
228
245
  }
229
246
  declare const send: {
230
- <TMessageID extends string>(context: RuleContext, descriptor: _ | null | ReportDescriptor<TMessageID>): void;
231
- <TMessageID extends string>(context: RuleContext): (descriptor: _ | null | ReportDescriptor<TMessageID>) => void;
247
+ <TMessageID extends string>(context: RuleContext, descriptor: unit | null | ReportDescriptor<TMessageID>): void;
248
+ <TMessageID extends string>(context: RuleContext): (descriptor: unit | null | ReportDescriptor<TMessageID>) => void;
232
249
  };
233
250
  declare const sendOrElse: {
234
- <TMessageID extends string, TElse>(context: RuleContext, descriptor: _ | null | ReportDescriptor<TMessageID>, cb: () => TElse): _ | TElse;
235
- <TMessageID extends string, TElse>(context: RuleContext): (descriptor: _ | null | ReportDescriptor<TMessageID>) => (cb: () => TElse) => _ | TElse;
251
+ <TMessageID extends string, TElse>(context: RuleContext, descriptor: unit | null | ReportDescriptor<TMessageID>, cb: () => TElse): unit | TElse;
252
+ <TMessageID extends string, TElse>(context: RuleContext): (descriptor: unit | null | ReportDescriptor<TMessageID>) => (cb: () => TElse) => unit | TElse;
236
253
  };
237
254
  declare function make<TMessageID extends string>(context: RuleContext): Reporter<TMessageID>;
238
255
 
@@ -275,4 +292,4 @@ declare namespace Selector {
275
292
  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 };
276
293
  }
277
294
 
278
- 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 };
295
+ 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, type RuleSuggest, Selector };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { dual, getOrElseUpdate } from '@eslint-react/eff';
2
- import * as z from '@zod/mini';
2
+ import { z } from 'zod/v4';
3
3
 
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -64,7 +64,7 @@ function toRegExp(string) {
64
64
  return { test: (s) => s === string };
65
65
  }
66
66
  function isRegExp(string) {
67
- return Boolean(REGEXP_STR.test(string));
67
+ return REGEXP_STR.test(string);
68
68
  }
69
69
 
70
70
  // src/JsxConfig/JsxConfig.ts
@@ -118,6 +118,7 @@ function getFromAnnotation(context) {
118
118
  var LanguagePreference_exports = {};
119
119
  __export(LanguagePreference_exports, {
120
120
  LanguagePreferenceSchema: () => LanguagePreferenceSchema,
121
+ defaultLanguagePreference: () => defaultLanguagePreference,
121
122
  getFromContext: () => getFromContext2,
122
123
  make: () => make2
123
124
  });
@@ -133,6 +134,7 @@ function make2() {
133
134
  trailingCommas: "all"
134
135
  };
135
136
  }
137
+ var defaultLanguagePreference = make2();
136
138
  function getFromContext2() {
137
139
  throw new Error("getFromContext is not implemented");
138
140
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/kit",
3
- "version": "2.0.0-next.13",
3
+ "version": "2.0.0-next.130",
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,19 +27,18 @@
27
27
  "./package.json"
28
28
  ],
29
29
  "dependencies": {
30
- "@typescript-eslint/utils": "^8.31.1",
31
- "@zod/mini": "^4.0.0-beta.20250503T014749",
32
- "ts-pattern": "^5.7.0",
33
- "@eslint-react/eff": "2.0.0-next.13"
30
+ "@typescript-eslint/utils": "^8.39.1",
31
+ "ts-pattern": "^5.8.0",
32
+ "zod": "^4.0.17",
33
+ "@eslint-react/eff": "2.0.0-next.130"
34
34
  },
35
35
  "devDependencies": {
36
- "@tsconfig/node22": "^22.0.1",
37
- "tsup": "^8.4.0",
38
- "type-fest": "^4.40.1",
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": {
42
- "bun": ">=1.0.15",
43
42
  "node": ">=20.19.0"
44
43
  },
45
44
  "scripts": {