@eslint-react/shared 1.5.11-next.1 → 1.5.11-next.11

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 CHANGED
@@ -1,7 +1,6 @@
1
1
  import { ESLintUtils } from '@typescript-eslint/utils';
2
2
  import * as valibot from 'valibot';
3
3
  import { Output } from 'valibot';
4
- export { parse as parseSchema, safeParse as safeParseSchema } from 'valibot';
5
4
  import { ReadonlyDeep } from 'type-fest';
6
5
 
7
6
  /**
@@ -98,6 +97,7 @@ declare const ESLintReactSettingsSchema: valibot.ObjectSchema<{
98
97
  useSyncExternalStore?: string[] | undefined;
99
98
  useTransition?: string[] | undefined;
100
99
  } | undefined>;
100
+ importSource: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
101
101
  jsxPragma: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
102
102
  jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
103
103
  version: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
@@ -121,6 +121,7 @@ declare const ESLintReactSettingsSchema: valibot.ObjectSchema<{
121
121
  useSyncExternalStore?: string[] | undefined;
122
122
  useTransition?: string[] | undefined;
123
123
  } | undefined;
124
+ importSource?: string | undefined;
124
125
  jsxPragma?: string | undefined;
125
126
  jsxPragmaFrag?: string | undefined;
126
127
  version?: string | undefined;
@@ -186,6 +187,7 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
186
187
  useSyncExternalStore?: string[] | undefined;
187
188
  useTransition?: string[] | undefined;
188
189
  } | undefined>;
190
+ importSource: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
189
191
  jsxPragma: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
190
192
  jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
191
193
  version: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
@@ -209,6 +211,7 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
209
211
  useSyncExternalStore?: string[] | undefined;
210
212
  useTransition?: string[] | undefined;
211
213
  } | undefined;
214
+ importSource?: string | undefined;
212
215
  jsxPragma?: string | undefined;
213
216
  jsxPragmaFrag?: string | undefined;
214
217
  version?: string | undefined;
@@ -232,6 +235,7 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
232
235
  useSyncExternalStore?: string[] | undefined;
233
236
  useTransition?: string[] | undefined;
234
237
  } | undefined;
238
+ importSource?: string | undefined;
235
239
  jsxPragma?: string | undefined;
236
240
  jsxPragmaFrag?: string | undefined;
237
241
  version?: string | undefined;
@@ -257,6 +261,7 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
257
261
  useSyncExternalStore?: string[] | undefined;
258
262
  useTransition?: string[] | undefined;
259
263
  } | undefined;
264
+ importSource?: string | undefined;
260
265
  jsxPragma?: string | undefined;
261
266
  jsxPragmaFrag?: string | undefined;
262
267
  version?: string | undefined;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { ESLintUtils } from '@typescript-eslint/utils';
2
2
  import * as valibot from 'valibot';
3
3
  import { Output } from 'valibot';
4
- export { parse as parseSchema, safeParse as safeParseSchema } from 'valibot';
5
4
  import { ReadonlyDeep } from 'type-fest';
6
5
 
7
6
  /**
@@ -98,6 +97,7 @@ declare const ESLintReactSettingsSchema: valibot.ObjectSchema<{
98
97
  useSyncExternalStore?: string[] | undefined;
99
98
  useTransition?: string[] | undefined;
100
99
  } | undefined>;
100
+ importSource: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
101
101
  jsxPragma: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
102
102
  jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
103
103
  version: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
@@ -121,6 +121,7 @@ declare const ESLintReactSettingsSchema: valibot.ObjectSchema<{
121
121
  useSyncExternalStore?: string[] | undefined;
122
122
  useTransition?: string[] | undefined;
123
123
  } | undefined;
124
+ importSource?: string | undefined;
124
125
  jsxPragma?: string | undefined;
125
126
  jsxPragmaFrag?: string | undefined;
126
127
  version?: string | undefined;
@@ -186,6 +187,7 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
186
187
  useSyncExternalStore?: string[] | undefined;
187
188
  useTransition?: string[] | undefined;
188
189
  } | undefined>;
190
+ importSource: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
189
191
  jsxPragma: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
190
192
  jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
191
193
  version: valibot.OptionalSchema<valibot.StringSchema<string>, undefined, string | undefined>;
@@ -209,6 +211,7 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
209
211
  useSyncExternalStore?: string[] | undefined;
210
212
  useTransition?: string[] | undefined;
211
213
  } | undefined;
214
+ importSource?: string | undefined;
212
215
  jsxPragma?: string | undefined;
213
216
  jsxPragmaFrag?: string | undefined;
214
217
  version?: string | undefined;
@@ -232,6 +235,7 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
232
235
  useSyncExternalStore?: string[] | undefined;
233
236
  useTransition?: string[] | undefined;
234
237
  } | undefined;
238
+ importSource?: string | undefined;
235
239
  jsxPragma?: string | undefined;
236
240
  jsxPragmaFrag?: string | undefined;
237
241
  version?: string | undefined;
@@ -257,6 +261,7 @@ declare const ESLintSettingsSchema: valibot.ObjectSchema<{
257
261
  useSyncExternalStore?: string[] | undefined;
258
262
  useTransition?: string[] | undefined;
259
263
  } | undefined;
264
+ importSource?: string | undefined;
260
265
  jsxPragma?: string | undefined;
261
266
  jsxPragmaFrag?: string | undefined;
262
267
  version?: string | undefined;
package/dist/index.js CHANGED
@@ -189,34 +189,9 @@ var getDocsUrl = (pluginName) => (ruleName) => {
189
189
  return `${WEBSITE_URL}/rules/${pluginName}-${ruleName}`;
190
190
  };
191
191
  var createRuleForPlugin = (pluginName) => utils.ESLintUtils.RuleCreator(getDocsUrl(pluginName));
192
-
193
- // ../../node_modules/.pnpm/valibot@0.30.0/node_modules/valibot/dist/index.js
194
- var ValiError = class extends Error {
195
- issues;
196
- /**
197
- * Creates a Valibot error with useful information.
198
- *
199
- * @param issues The error issues.
200
- */
201
- constructor(issues) {
202
- super(issues[0].message);
203
- this.name = "ValiError";
204
- this.issues = issues;
205
- }
206
- };
207
192
  function defaultArgs(arg1, arg2) {
208
193
  return Array.isArray(arg1) ? [void 0, arg1] : [arg1, arg2];
209
194
  }
210
- var store;
211
- function getGlobalConfig(config) {
212
- return {
213
- lang: config?.lang ?? store?.lang,
214
- message: config?.message,
215
- abortEarly: config?.abortEarly ?? store?.abortEarly,
216
- abortPipeEarly: config?.abortPipeEarly ?? store?.abortPipeEarly,
217
- skipPipe: config?.skipPipe ?? store?.skipPipe
218
- };
219
- }
220
195
  var store2;
221
196
  function getGlobalMessage(lang) {
222
197
  return store2?.get(lang);
@@ -512,22 +487,6 @@ function string(arg1, arg2) {
512
487
  }
513
488
  };
514
489
  }
515
- function parse(schema, input, config) {
516
- const result = schema._parse(input, getGlobalConfig(config));
517
- if (result.issues) {
518
- throw new ValiError(result.issues);
519
- }
520
- return result.output;
521
- }
522
- function safeParse(schema, input, config) {
523
- const result = schema._parse(input, getGlobalConfig(config));
524
- return {
525
- typed: result.typed,
526
- success: !result.issues,
527
- output: result.output,
528
- issues: result.issues
529
- };
530
- }
531
490
 
532
491
  // src/settings.ts
533
492
  var ESLintReactSettingsSchema = object({
@@ -550,6 +509,7 @@ var ESLintReactSettingsSchema = object({
550
509
  useSyncExternalStore: optional(array(string())),
551
510
  useTransition: optional(array(string()))
552
511
  })),
512
+ importSource: optional(string()),
553
513
  jsxPragma: optional(string()),
554
514
  jsxPragmaFrag: optional(string()),
555
515
  version: optional(string())
@@ -572,5 +532,3 @@ exports.RE_PASCAL_CASE = RE_PASCAL_CASE;
572
532
  exports.RE_SNAKE_CASE = RE_SNAKE_CASE;
573
533
  exports.WEBSITE_URL = WEBSITE_URL;
574
534
  exports.createRuleForPlugin = createRuleForPlugin;
575
- exports.parseSchema = parse;
576
- exports.safeParseSchema = safeParse;
package/dist/index.mjs CHANGED
@@ -187,34 +187,9 @@ var getDocsUrl = (pluginName) => (ruleName) => {
187
187
  return `${WEBSITE_URL}/rules/${pluginName}-${ruleName}`;
188
188
  };
189
189
  var createRuleForPlugin = (pluginName) => ESLintUtils.RuleCreator(getDocsUrl(pluginName));
190
-
191
- // ../../node_modules/.pnpm/valibot@0.30.0/node_modules/valibot/dist/index.js
192
- var ValiError = class extends Error {
193
- issues;
194
- /**
195
- * Creates a Valibot error with useful information.
196
- *
197
- * @param issues The error issues.
198
- */
199
- constructor(issues) {
200
- super(issues[0].message);
201
- this.name = "ValiError";
202
- this.issues = issues;
203
- }
204
- };
205
190
  function defaultArgs(arg1, arg2) {
206
191
  return Array.isArray(arg1) ? [void 0, arg1] : [arg1, arg2];
207
192
  }
208
- var store;
209
- function getGlobalConfig(config) {
210
- return {
211
- lang: config?.lang ?? store?.lang,
212
- message: config?.message,
213
- abortEarly: config?.abortEarly ?? store?.abortEarly,
214
- abortPipeEarly: config?.abortPipeEarly ?? store?.abortPipeEarly,
215
- skipPipe: config?.skipPipe ?? store?.skipPipe
216
- };
217
- }
218
193
  var store2;
219
194
  function getGlobalMessage(lang) {
220
195
  return store2?.get(lang);
@@ -510,22 +485,6 @@ function string(arg1, arg2) {
510
485
  }
511
486
  };
512
487
  }
513
- function parse(schema, input, config) {
514
- const result = schema._parse(input, getGlobalConfig(config));
515
- if (result.issues) {
516
- throw new ValiError(result.issues);
517
- }
518
- return result.output;
519
- }
520
- function safeParse(schema, input, config) {
521
- const result = schema._parse(input, getGlobalConfig(config));
522
- return {
523
- typed: result.typed,
524
- success: !result.issues,
525
- output: result.output,
526
- issues: result.issues
527
- };
528
- }
529
488
 
530
489
  // src/settings.ts
531
490
  var ESLintReactSettingsSchema = object({
@@ -548,6 +507,7 @@ var ESLintReactSettingsSchema = object({
548
507
  useSyncExternalStore: optional(array(string())),
549
508
  useTransition: optional(array(string()))
550
509
  })),
510
+ importSource: optional(string()),
551
511
  jsxPragma: optional(string()),
552
512
  jsxPragmaFrag: optional(string()),
553
513
  version: optional(string())
@@ -556,4 +516,4 @@ var ESLintSettingsSchema = object({
556
516
  reactOptions: optional(ESLintReactSettingsSchema)
557
517
  });
558
518
 
559
- export { ESLintReactSettingsSchema, ESLintSettingsSchema, GITHUB_URL, HOST_HTML_COMPONENT_TYPES, HOST_SVG_COMPONENT_TYPES, NPM_SCOPE, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, WEBSITE_URL, createRuleForPlugin, parse as parseSchema, safeParse as safeParseSchema };
519
+ export { ESLintReactSettingsSchema, ESLintSettingsSchema, GITHUB_URL, HOST_HTML_COMPONENT_TYPES, HOST_SVG_COMPONENT_TYPES, NPM_SCOPE, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, WEBSITE_URL, createRuleForPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/shared",
3
- "version": "1.5.11-next.1",
3
+ "version": "1.5.11-next.11",
4
4
  "description": "ESLint React's Shared constants and functions.",
5
5
  "homepage": "https://github.com/rel1cx/eslint-react",
6
6
  "bugs": {
@@ -39,7 +39,7 @@
39
39
  "deepmerge-ts": "5.1.0"
40
40
  },
41
41
  "devDependencies": {
42
- "type-fest": "4.18.0",
42
+ "type-fest": "4.18.2",
43
43
  "valibot": "0.30.0"
44
44
  },
45
45
  "scripts": {