@eslint-react/shared 2.0.0-next.1 → 2.0.0-next.3

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
@@ -2,6 +2,16 @@ import { _ } from '@eslint-react/eff';
2
2
  import { RuleContext } from '@eslint-react/kit';
3
3
  import * as z from '@zod/mini';
4
4
 
5
+ /**
6
+ * @internal
7
+ */
8
+ declare const getId: () => string;
9
+
10
+ /**
11
+ * @internal
12
+ */
13
+ declare const _require: NodeJS.Require;
14
+
5
15
  /**
6
16
  * The NPM scope for this project.
7
17
  */
@@ -23,8 +33,6 @@ declare const WEBSITE_URL = "https://eslint-react.xyz";
23
33
  */
24
34
  declare const getDocsUrl: (pluginName: string) => (ruleName: string) => string;
25
35
 
26
- declare const getId: () => string;
27
-
28
36
  declare function getReactVersion(fallback: string): string;
29
37
 
30
38
  /**
@@ -1075,4 +1083,4 @@ declare module "@typescript-eslint/utils/ts-eslint" {
1075
1083
  }
1076
1084
  }
1077
1085
 
1078
- export { type CustomComponent, type CustomComponentNormalized, type CustomComponentProp, type CustomComponentPropNormalized, CustomComponentPropSchema, CustomComponentSchema, type CustomHooks, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, type ESLintReactSettings, type ESLintReactSettingsNormalized, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, WEBSITE_URL, coerceESLintSettings, coerceSettings, decodeESLintSettings, decodeSettings, defineSettings, getDocsUrl, getId, getReactVersion, getSettingsFromContext, isESLintReactSettings, isESLintSettings, normalizeSettings };
1086
+ export { type CustomComponent, type CustomComponentNormalized, type CustomComponentProp, type CustomComponentPropNormalized, CustomComponentPropSchema, CustomComponentSchema, type CustomHooks, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, type ESLintReactSettings, type ESLintReactSettingsNormalized, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, WEBSITE_URL, _require, coerceESLintSettings, coerceSettings, decodeESLintSettings, decodeSettings, defineSettings, getDocsUrl, getId, getReactVersion, getSettingsFromContext, isESLintReactSettings, isESLintSettings, normalizeSettings };
package/dist/index.js CHANGED
@@ -1,9 +1,15 @@
1
1
  import module from 'node:module';
2
+ import path from 'node:path';
2
3
  import { identity, getOrElseUpdate } from '@eslint-react/eff';
3
4
  import { match, P } from 'ts-pattern';
4
5
  import { RegExp } from '@eslint-react/kit';
5
6
  import * as z from '@zod/mini';
6
7
 
8
+ // src/_id.ts
9
+ var id = 0n;
10
+ var getId = () => (id++).toString();
11
+ var _require = module.createRequire(process.cwd() + path.sep);
12
+
7
13
  // src/constants.ts
8
14
  var NPM_SCOPE = "@eslint-react";
9
15
  var GITHUB_URL = "https://github.com/Rel1cx/eslint-react";
@@ -16,11 +22,6 @@ var getDocsUrl = (pluginName) => (ruleName) => {
16
22
  }
17
23
  return `${WEBSITE_URL}/docs/rules/${pluginName}-${ruleName}`;
18
24
  };
19
-
20
- // src/get-id.ts
21
- var id = 0n;
22
- var getId = () => (id++).toString();
23
- var _require = module.createRequire(import.meta.url);
24
25
  function getReactVersion(fallback) {
25
26
  try {
26
27
  return match(_require("react")).with({ version: P.select(P.string) }, identity).otherwise(() => fallback);
@@ -216,7 +217,6 @@ var normalizeSettings = ({
216
217
  version,
217
218
  ...rest
218
219
  }) => {
219
- const fallbackVersion = DEFAULT_ESLINT_REACT_SETTINGS.version;
220
220
  return {
221
221
  ...rest,
222
222
  components: additionalComponents.map((component) => {
@@ -239,7 +239,7 @@ var normalizeSettings = ({
239
239
  polymorphicPropName,
240
240
  skipImportCheck,
241
241
  strict,
242
- version: match(version).with(P.union(P.nullish, "", "detect"), () => getReactVersion(fallbackVersion)).otherwise(identity)
242
+ version: match(version).with(P.union(P.nullish, "", "detect"), () => getReactVersion("19.1.0")).otherwise(identity)
243
243
  };
244
244
  };
245
245
  var cache = /* @__PURE__ */ new Map();
@@ -253,4 +253,4 @@ function getSettingsFromContext(context) {
253
253
  }
254
254
  var defineSettings = identity;
255
255
 
256
- export { CustomComponentPropSchema, CustomComponentSchema, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, ESLintReactSettingsSchema, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, WEBSITE_URL, coerceESLintSettings, coerceSettings, decodeESLintSettings, decodeSettings, defineSettings, getDocsUrl, getId, getReactVersion, getSettingsFromContext, isESLintReactSettings, isESLintSettings, normalizeSettings };
256
+ export { CustomComponentPropSchema, CustomComponentSchema, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, ESLintReactSettingsSchema, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, WEBSITE_URL, _require, coerceESLintSettings, coerceSettings, decodeESLintSettings, decodeSettings, defineSettings, getDocsUrl, getId, getReactVersion, getSettingsFromContext, isESLintReactSettings, isESLintSettings, normalizeSettings };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/shared",
3
- "version": "2.0.0-next.1",
3
+ "version": "2.0.0-next.3",
4
4
  "description": "ESLint React's Shared constants and functions.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -30,8 +30,8 @@
30
30
  "@typescript-eslint/utils": "^8.30.1",
31
31
  "@zod/mini": "^4.0.0-beta.20250418T073619",
32
32
  "ts-pattern": "^5.7.0",
33
- "@eslint-react/eff": "2.0.0-next.1",
34
- "@eslint-react/kit": "2.0.0-next.1"
33
+ "@eslint-react/eff": "2.0.0-next.3",
34
+ "@eslint-react/kit": "2.0.0-next.3"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@tsconfig/node22": "^22.0.1",