@eslint-react/shared 5.0.2-next.5 → 5.1.0-beta.1

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,25 +1,6 @@
1
1
  import { z } from "zod/v4";
2
2
  import * as tseslint from "@typescript-eslint/utils/ts-eslint";
3
- import { ReportFixFunction, RuleFix, RuleFixer, RuleListener, RuleListener as RuleListener$1 } from "@typescript-eslint/utils/ts-eslint";
4
3
 
5
- //#region src/define-rule-listener.d.ts
6
- /**
7
- * Defines a rule listener by merging multiple visitor objects
8
- *
9
- * @param base Base visitor object (target of merge)
10
- * @param rest Additional visitor objects to merge (one or more)
11
- * @returns Merged RuleListener object
12
- *
13
- * @example
14
- * ```typescript
15
- * const listener1 = { Identifier: () => console.log(1) };
16
- * const listener2 = { Identifier: () => console.log(2) };
17
- * const merged = defineRuleListener(listener1, listener2);
18
- * // When encountering Identifier nodes, outputs 1 then 2
19
- * ```
20
- */
21
- declare function defineRuleListener(base: RuleListener$1, ...rest: RuleListener$1[]): RuleListener$1;
22
- //#endregion
23
4
  //#region src/regexp.d.ts
24
5
  /**
25
6
  * Regular expressions for matching a HTML tag name
@@ -112,6 +93,7 @@ declare function toRegExp(string: string | null | undefined): RegExpLike;
112
93
  */
113
94
  declare function isRegExp(string: string): boolean;
114
95
  //#endregion
96
+ //#region ../eslint/dist/index.d.ts
115
97
  //#region src/types.d.ts
116
98
  /**
117
99
  * Rule context.
@@ -122,15 +104,6 @@ type RuleContext<MessageIds extends string = string, Options extends readonly un
122
104
  * Rule feature.
123
105
  * @since 1.20.0
124
106
  */
125
- type RuleFeature = "CFG" | "DBG" | "FIX" | "MOD" | "TSC" | "EXP";
126
- /**
127
- * A suggestion for fixing a reported issue.
128
- */
129
- type RuleSuggest<MessageIds extends string = string> = {
130
- /** Optional data to pass to the message formatter. */data?: Record<string, unknown>; /** The fix function to apply the suggestion. */
131
- fix: tseslint.ReportFixFunction; /** The message ID for the suggestion. */
132
- messageId: MessageIds;
133
- };
134
107
  //#endregion
135
108
  //#region src/settings.d.ts
136
109
  /**
@@ -210,4 +183,4 @@ declare module "@typescript-eslint/utils/ts-eslint" {
210
183
  }
211
184
  }
212
185
  //#endregion
213
- export { DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, ESLintReactSettings, ESLintReactSettingsNormalized, ESLintReactSettingsSchema, ESLintSettings, ESLintSettingsSchema, RE_ANNOTATION_JSX, RE_ANNOTATION_JSX_FRAG, RE_ANNOTATION_JSX_IMPORT_SOURCE, RE_ANNOTATION_JSX_RUNTIME, RE_CAMEL_CASE, RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE, RE_CONSTANT_CASE, RE_HOOK_NAME, RE_HTML_TAG, RE_JAVASCRIPT_PROTOCOL, RE_JS_EXT, RE_JS_IDENTIFIER, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_REGEXP_STR, RE_SNAKE_CASE, RE_TS_EXT, RegExpLike, type ReportFixFunction, RuleContext, RuleFeature, type RuleFix, type RuleFixer, type RuleListener, RuleSuggest, decodeESLintSettings, decodeSettings, defineRuleListener, getReactVersion, getSettingsFromContext, isESLintReactSettings, isESLintSettings, isRegExp, normalizeSettings, toRegExp };
186
+ export { DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, ESLintReactSettings, ESLintReactSettingsNormalized, ESLintReactSettingsSchema, ESLintSettings, ESLintSettingsSchema, RE_ANNOTATION_JSX, RE_ANNOTATION_JSX_FRAG, RE_ANNOTATION_JSX_IMPORT_SOURCE, RE_ANNOTATION_JSX_RUNTIME, RE_CAMEL_CASE, RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE, RE_CONSTANT_CASE, RE_HOOK_NAME, RE_HTML_TAG, RE_JAVASCRIPT_PROTOCOL, RE_JS_EXT, RE_JS_IDENTIFIER, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_REGEXP_STR, RE_SNAKE_CASE, RE_TS_EXT, RegExpLike, decodeESLintSettings, decodeSettings, getReactVersion, getSettingsFromContext, isESLintReactSettings, isESLintSettings, isRegExp, normalizeSettings, toRegExp };
package/dist/index.js CHANGED
@@ -3,35 +3,7 @@ import path from "node:path";
3
3
  import { P, match } from "ts-pattern";
4
4
  import { z } from "zod/v4";
5
5
 
6
- //#region src/define-rule-listener.ts
7
- /**
8
- * Defines a rule listener by merging multiple visitor objects
9
- *
10
- * @param base Base visitor object (target of merge)
11
- * @param rest Additional visitor objects to merge (one or more)
12
- * @returns Merged RuleListener object
13
- *
14
- * @example
15
- * ```typescript
16
- * const listener1 = { Identifier: () => console.log(1) };
17
- * const listener2 = { Identifier: () => console.log(2) };
18
- * const merged = defineRuleListener(listener1, listener2);
19
- * // When encountering Identifier nodes, outputs 1 then 2
20
- * ```
21
- */
22
- function defineRuleListener(base, ...rest) {
23
- for (const r of rest) for (const key in r) {
24
- const existing = base[key];
25
- base[key] = existing ? (...args) => {
26
- existing(...args);
27
- r[key]?.(...args);
28
- } : r[key];
29
- }
30
- return base;
31
- }
32
-
33
- //#endregion
34
- //#region ../../.pkgs/eff/dist/index.js
6
+ //#region ../../../.pkgs/eff/dist/index.js
35
7
  /**
36
8
  * Returns its argument.
37
9
  *
@@ -337,4 +309,4 @@ function getSettingsFromContext(context) {
337
309
  }
338
310
 
339
311
  //#endregion
340
- export { DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, ESLintReactSettingsSchema, ESLintSettingsSchema, RE_ANNOTATION_JSX, RE_ANNOTATION_JSX_FRAG, RE_ANNOTATION_JSX_IMPORT_SOURCE, RE_ANNOTATION_JSX_RUNTIME, RE_CAMEL_CASE, RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE, RE_CONSTANT_CASE, RE_HOOK_NAME, RE_HTML_TAG, RE_JAVASCRIPT_PROTOCOL, RE_JS_EXT, RE_JS_IDENTIFIER, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_REGEXP_STR, RE_SNAKE_CASE, RE_TS_EXT, decodeESLintSettings, decodeSettings, defineRuleListener, getReactVersion, getSettingsFromContext, isESLintReactSettings, isESLintSettings, isRegExp, normalizeSettings, toRegExp };
312
+ export { DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, ESLintReactSettingsSchema, ESLintSettingsSchema, RE_ANNOTATION_JSX, RE_ANNOTATION_JSX_FRAG, RE_ANNOTATION_JSX_IMPORT_SOURCE, RE_ANNOTATION_JSX_RUNTIME, RE_CAMEL_CASE, RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE, RE_CONSTANT_CASE, RE_HOOK_NAME, RE_HTML_TAG, RE_JAVASCRIPT_PROTOCOL, RE_JS_EXT, RE_JS_IDENTIFIER, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_REGEXP_STR, RE_SNAKE_CASE, RE_TS_EXT, decodeESLintSettings, decodeSettings, getReactVersion, getSettingsFromContext, isESLintReactSettings, isESLintSettings, isRegExp, normalizeSettings, toRegExp };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/shared",
3
- "version": "5.0.2-next.5",
3
+ "version": "5.1.0-beta.1",
4
4
  "description": "ESLint React's Shared constants and functions.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -9,7 +9,7 @@
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "git+https://github.com/Rel1cx/eslint-react.git",
12
- "directory": "packages/shared"
12
+ "directory": "packages/@eslint-react/shared"
13
13
  },
14
14
  "license": "MIT",
15
15
  "author": "Rel1cx",
@@ -30,13 +30,13 @@
30
30
  "./package.json"
31
31
  ],
32
32
  "dependencies": {
33
- "@typescript-eslint/utils": "^8.58.0",
33
+ "@typescript-eslint/utils": "^8.58.1",
34
34
  "ts-pattern": "^5.9.0",
35
35
  "zod": "^4.3.6"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@tsconfig/node24": "^24.0.4",
39
- "@types/node": "^25.5.2",
39
+ "@types/node": "^25.6.0",
40
40
  "@types/picomatch": "^4.0.3",
41
41
  "tsdown": "^0.21.7",
42
42
  "@local/configs": "0.0.0",
@@ -44,7 +44,8 @@
44
44
  },
45
45
  "peerDependencies": {
46
46
  "eslint": "^10.2.0",
47
- "typescript": "*"
47
+ "typescript": "*",
48
+ "@eslint-react/eslint": "5.1.0-beta.1"
48
49
  },
49
50
  "engines": {
50
51
  "node": ">=22.0.0"