@eslint-react/shared 2.3.2-next.2 → 2.3.2-next.6
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 +16 -4
- package/dist/index.js +22 -5
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -6,9 +6,21 @@ import { PartialDeep } from "type-fest";
|
|
|
6
6
|
|
|
7
7
|
//#region src/_id.d.ts
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
declare
|
|
9
|
+
* A generator for unique ids.
|
|
10
|
+
*/
|
|
11
|
+
declare class IdGenerator {
|
|
12
|
+
private n;
|
|
13
|
+
private prefix;
|
|
14
|
+
/**
|
|
15
|
+
* @param prefix Optional. A prefix of generated ids.
|
|
16
|
+
*/
|
|
17
|
+
constructor(prefix?: string);
|
|
18
|
+
/**
|
|
19
|
+
* Generates an id.
|
|
20
|
+
* @returns A generated id.
|
|
21
|
+
*/
|
|
22
|
+
next(): string;
|
|
23
|
+
}
|
|
12
24
|
//#endregion
|
|
13
25
|
//#region src/_require.d.ts
|
|
14
26
|
/**
|
|
@@ -311,4 +323,4 @@ declare module "@typescript-eslint/utils/ts-eslint" {
|
|
|
311
323
|
}
|
|
312
324
|
}
|
|
313
325
|
//#endregion
|
|
314
|
-
export { CompatibleConfig, CompatiblePlugin, CompatibleRule, DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, ESLintReactSettings, ESLintReactSettingsNormalized, ESLintReactSettingsSchema, ESLintSettings, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, 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, RuleConfig, RuleContext, RuleFeature, RulePolicy, RuleSuggest, SettingsConfig, Severity, SeverityLevel, SeverityName, WEBSITE_URL, _require, coerceESLintSettings, coerceSettings, decodeESLintSettings, decodeSettings, defineSettings, getConfigAdapters,
|
|
326
|
+
export { CompatibleConfig, CompatiblePlugin, CompatibleRule, DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, ESLintReactSettings, ESLintReactSettingsNormalized, ESLintReactSettingsSchema, ESLintSettings, ESLintSettingsSchema, GITHUB_URL, IdGenerator, NPM_SCOPE, 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, RuleConfig, RuleContext, RuleFeature, RulePolicy, RuleSuggest, SettingsConfig, Severity, SeverityLevel, SeverityName, WEBSITE_URL, _require, coerceESLintSettings, coerceSettings, decodeESLintSettings, decodeSettings, defineSettings, getConfigAdapters, getReactVersion, getSettingsFromContext, isESLintReactSettings, isESLintSettings, isRegExp, normalizeSettings, report, toRegExp };
|
package/dist/index.js
CHANGED
|
@@ -5,11 +5,28 @@ import { P, match } from "ts-pattern";
|
|
|
5
5
|
import { z } from "zod/v4";
|
|
6
6
|
|
|
7
7
|
//#region src/_id.ts
|
|
8
|
-
let id = 0n;
|
|
9
8
|
/**
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
|
|
9
|
+
* A generator for unique ids.
|
|
10
|
+
*/
|
|
11
|
+
var IdGenerator = class {
|
|
12
|
+
n;
|
|
13
|
+
prefix;
|
|
14
|
+
/**
|
|
15
|
+
* @param prefix Optional. A prefix of generated ids.
|
|
16
|
+
*/
|
|
17
|
+
constructor(prefix = "id_") {
|
|
18
|
+
this.prefix = prefix;
|
|
19
|
+
this.n = 0n;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Generates an id.
|
|
23
|
+
* @returns A generated id.
|
|
24
|
+
*/
|
|
25
|
+
next() {
|
|
26
|
+
this.n = 1n + this.n;
|
|
27
|
+
return this.prefix + this.n.toString(16);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
13
30
|
|
|
14
31
|
//#endregion
|
|
15
32
|
//#region src/_require.ts
|
|
@@ -267,4 +284,4 @@ function getSettingsFromContext(context) {
|
|
|
267
284
|
const defineSettings = identity;
|
|
268
285
|
|
|
269
286
|
//#endregion
|
|
270
|
-
export { DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, ESLintReactSettingsSchema, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, 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, WEBSITE_URL, _require, coerceESLintSettings, coerceSettings, decodeESLintSettings, decodeSettings, defineSettings, getConfigAdapters,
|
|
287
|
+
export { DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, ESLintReactSettingsSchema, ESLintSettingsSchema, GITHUB_URL, IdGenerator, NPM_SCOPE, 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, WEBSITE_URL, _require, coerceESLintSettings, coerceSettings, decodeESLintSettings, decodeSettings, defineSettings, getConfigAdapters, getReactVersion, getSettingsFromContext, isESLintReactSettings, isESLintSettings, isRegExp, normalizeSettings, report, toRegExp };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/shared",
|
|
3
|
-
"version": "2.3.2-next.
|
|
3
|
+
"version": "2.3.2-next.6",
|
|
4
4
|
"description": "ESLint React's Shared constants and functions.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"./package.json"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@typescript-eslint/utils": "^8.46.
|
|
33
|
+
"@typescript-eslint/utils": "^8.46.3",
|
|
34
34
|
"ts-pattern": "^5.9.0",
|
|
35
35
|
"zod": "^4.1.12",
|
|
36
|
-
"@eslint-react/eff": "2.3.2-next.
|
|
36
|
+
"@eslint-react/eff": "2.3.2-next.6"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@tsconfig/node22": "^22.0.2",
|
|
40
40
|
"@types/picomatch": "^4.0.2",
|
|
41
|
-
"tsdown": "^0.
|
|
41
|
+
"tsdown": "^0.16.0",
|
|
42
42
|
"type-fest": "^5.2.0",
|
|
43
43
|
"@local/configs": "0.0.0"
|
|
44
44
|
},
|