@eslint-react/shared 5.0.2-next.0 → 5.0.2-next.4
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 +2 -39
- package/dist/index.js +1 -15
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
2
|
import * as tseslint from "@typescript-eslint/utils/ts-eslint";
|
|
3
|
-
import {
|
|
3
|
+
import { ReportFixFunction, RuleFix, RuleFixer, RuleListener, RuleListener as RuleListener$1 } from "@typescript-eslint/utils/ts-eslint";
|
|
4
4
|
|
|
5
5
|
//#region src/define-rule-listener.d.ts
|
|
6
6
|
/**
|
|
@@ -113,29 +113,6 @@ declare function toRegExp(string: string | null | undefined): RegExpLike;
|
|
|
113
113
|
declare function isRegExp(string: string): boolean;
|
|
114
114
|
//#endregion
|
|
115
115
|
//#region src/types.d.ts
|
|
116
|
-
/**
|
|
117
|
-
* Rule severity.
|
|
118
|
-
* @since 0.0.1
|
|
119
|
-
*/
|
|
120
|
-
type SeverityName = "off" | "warn" | "error";
|
|
121
|
-
/**
|
|
122
|
-
* The numeric severity level for a rule.
|
|
123
|
-
*
|
|
124
|
-
* - `0` means off.
|
|
125
|
-
* - `1` means warn.
|
|
126
|
-
* - `2` means error.
|
|
127
|
-
*/
|
|
128
|
-
type SeverityLevel = 0 | 1 | 2;
|
|
129
|
-
/**
|
|
130
|
-
* The severity of a rule in a configuration.
|
|
131
|
-
*/
|
|
132
|
-
type Severity = SeverityName | SeverityLevel;
|
|
133
|
-
/**
|
|
134
|
-
* Rule declaration.
|
|
135
|
-
* @internal
|
|
136
|
-
* @since 0.0.1
|
|
137
|
-
*/
|
|
138
|
-
type RuleConfig<RuleOptions extends unknown[] = unknown[]> = Severity | [Severity, ...Partial<RuleOptions>];
|
|
139
116
|
/**
|
|
140
117
|
* Rule context.
|
|
141
118
|
* @since 0.0.1
|
|
@@ -154,20 +131,6 @@ type RuleSuggest<MessageIds extends string = string> = {
|
|
|
154
131
|
fix: tseslint.ReportFixFunction; /** The message ID for the suggestion. */
|
|
155
132
|
messageId: MessageIds;
|
|
156
133
|
};
|
|
157
|
-
/**
|
|
158
|
-
* A collection of settings.
|
|
159
|
-
*/
|
|
160
|
-
interface SettingsConfig {
|
|
161
|
-
[key: string]: unknown;
|
|
162
|
-
}
|
|
163
|
-
//#endregion
|
|
164
|
-
//#region src/report.d.ts
|
|
165
|
-
/**
|
|
166
|
-
* Creates a report function for the given rule context.
|
|
167
|
-
* @param context The ESLint rule context.
|
|
168
|
-
* @returns A function that can be used to report violations.
|
|
169
|
-
*/
|
|
170
|
-
declare function report(context: RuleContext): (descriptor?: null | ReportDescriptor<string>) => void;
|
|
171
134
|
//#endregion
|
|
172
135
|
//#region src/settings.d.ts
|
|
173
136
|
/**
|
|
@@ -247,4 +210,4 @@ declare module "@typescript-eslint/utils/ts-eslint" {
|
|
|
247
210
|
}
|
|
248
211
|
}
|
|
249
212
|
//#endregion
|
|
250
|
-
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,
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -265,20 +265,6 @@ function isRegExp(string) {
|
|
|
265
265
|
return RE_REGEXP_STR.test(string);
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
//#endregion
|
|
269
|
-
//#region src/report.ts
|
|
270
|
-
/**
|
|
271
|
-
* Creates a report function for the given rule context.
|
|
272
|
-
* @param context The ESLint rule context.
|
|
273
|
-
* @returns A function that can be used to report violations.
|
|
274
|
-
*/
|
|
275
|
-
function report(context) {
|
|
276
|
-
return (descriptor) => {
|
|
277
|
-
if (descriptor == null) return;
|
|
278
|
-
return context.report(descriptor);
|
|
279
|
-
};
|
|
280
|
-
}
|
|
281
|
-
|
|
282
268
|
//#endregion
|
|
283
269
|
//#region src/settings.ts
|
|
284
270
|
const _require = module.createRequire(process.cwd() + path.sep);
|
|
@@ -352,4 +338,4 @@ function getSettingsFromContext(context) {
|
|
|
352
338
|
}
|
|
353
339
|
|
|
354
340
|
//#endregion
|
|
355
|
-
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,
|
|
341
|
+
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/shared",
|
|
3
|
-
"version": "5.0.2-next.
|
|
3
|
+
"version": "5.0.2-next.4",
|
|
4
4
|
"description": "ESLint React's Shared constants and functions.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@local/eff": "3.0.0-beta.72"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"eslint": "^10.
|
|
46
|
+
"eslint": "^10.2.0",
|
|
47
47
|
"typescript": "*"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|