@eslint-react/shared 5.28.7 → 5.30.0-beta.0
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 +1 -5
- package/dist/index.js +3 -6
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
2
|
import { RuleContext } from "@eslint-react/eslint";
|
|
3
|
-
//#region src/regexp.d.ts
|
|
4
3
|
/** Regular expression for matching an HTML tag name. */
|
|
5
4
|
export declare const RE_HTML_TAG: RegExp;
|
|
6
5
|
/** Regular expression for matching a TypeScript file extension. */
|
|
@@ -60,8 +59,6 @@ export declare function toRegExp(string: string | null | undefined): RegExpLike;
|
|
|
60
59
|
* @returns `true` if the string is a RegExp string.
|
|
61
60
|
*/
|
|
62
61
|
export declare function isRegExp(string: string): boolean;
|
|
63
|
-
//#endregion
|
|
64
|
-
//#region src/settings.d.ts
|
|
65
62
|
/**
|
|
66
63
|
* The zod schema for the ESLint React settings.
|
|
67
64
|
* @internal
|
|
@@ -190,5 +187,4 @@ declare module "@typescript-eslint/utils/ts-eslint" {
|
|
|
190
187
|
interface SharedConfigurationSettings {
|
|
191
188
|
["react-x"]?: Partial<ESLintReactSettings>;
|
|
192
189
|
}
|
|
193
|
-
}
|
|
194
|
-
//#endregion
|
|
190
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import module from "node:module";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { P, match } from "ts-pattern";
|
|
4
4
|
import { z } from "zod/v4";
|
|
5
|
-
|
|
5
|
+
// ../../.pkgs/eff/dist/index.js
|
|
6
6
|
const pipeArguments = (self, args) => {
|
|
7
7
|
switch (args.length) {
|
|
8
8
|
case 0: return self;
|
|
@@ -109,8 +109,7 @@ dual(2, (self, predicate) => {
|
|
|
109
109
|
while (idx < len && predicate(input[idx], idx)) idx++;
|
|
110
110
|
return input.slice(0, idx);
|
|
111
111
|
});
|
|
112
|
-
|
|
113
|
-
//#region src/regexp.ts
|
|
112
|
+
// src/regexp.ts
|
|
114
113
|
const RE_HTML_TAG = /^[a-z][^-]*$/u;
|
|
115
114
|
const RE_TS_EXT = /^[cm]?tsx?$/u;
|
|
116
115
|
const RE_JS_EXT = /^[cm]?jsx?$/u;
|
|
@@ -138,8 +137,7 @@ function toRegExp(string) {
|
|
|
138
137
|
function isRegExp(string) {
|
|
139
138
|
return RE_REGEXP_STR.test(string);
|
|
140
139
|
}
|
|
141
|
-
|
|
142
|
-
//#region src/settings.ts
|
|
140
|
+
// src/settings.ts
|
|
143
141
|
const ESLintReactSettingsSchema = z.object({
|
|
144
142
|
importSource: z.optional(z.string()),
|
|
145
143
|
compilationMode: z.optional(z.enum([
|
|
@@ -198,5 +196,4 @@ const getNormalizedSettings = memoize((settings) => normalizeSettings(decodeSett
|
|
|
198
196
|
function getSettingsFromContext(context) {
|
|
199
197
|
return getNormalizedSettings(context.settings["react-x"]);
|
|
200
198
|
}
|
|
201
|
-
//#endregion
|
|
202
199
|
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, getNormalizedSettings, 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.
|
|
3
|
+
"version": "5.30.0-beta.0",
|
|
4
4
|
"description": "ESLint React's Shared constants and functions.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@eslint-react/eslint": "5.
|
|
32
|
+
"@eslint-react/eslint": "5.30.0-beta.0",
|
|
33
33
|
"@typescript-eslint/utils": "^8.72.0",
|
|
34
34
|
"ts-pattern": "^5.9.2",
|
|
35
35
|
"zod": "^3.25.0 || ^4.0.0"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@types/picomatch": "^4.0.3",
|
|
43
43
|
"eslint": "^10.13.0",
|
|
44
44
|
"tinybench": "6.2.2",
|
|
45
|
-
"tsdown": "^0.23.
|
|
45
|
+
"tsdown": "^0.23.2",
|
|
46
46
|
"typescript": "6.0.3"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|