@eslint-react/kit 2.0.0-next.157 → 2.0.0-next.159
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 +37 -8
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -44,18 +44,25 @@ declare function isViMockCallback(node: TSESTree.Node | null | unit): boolean;
|
|
|
44
44
|
* Rule severity.
|
|
45
45
|
* @since 0.0.1
|
|
46
46
|
*/
|
|
47
|
-
type
|
|
47
|
+
type SeverityName = "off" | "warn" | "error";
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
49
|
+
* The numeric severity level for a rule.
|
|
50
|
+
*
|
|
51
|
+
* - `0` means off.
|
|
52
|
+
* - `1` means warn.
|
|
53
|
+
* - `2` means error.
|
|
52
54
|
*/
|
|
53
|
-
type
|
|
55
|
+
type SeverityLevel = 0 | 1 | 2;
|
|
54
56
|
/**
|
|
55
|
-
*
|
|
57
|
+
* The severity of a rule in a configuration.
|
|
58
|
+
*/
|
|
59
|
+
type Severity = SeverityName | SeverityLevel;
|
|
60
|
+
/**
|
|
61
|
+
* Rule declaration.
|
|
62
|
+
* @internal
|
|
56
63
|
* @since 0.0.1
|
|
57
64
|
*/
|
|
58
|
-
type
|
|
65
|
+
type RuleConfig<RuleOptions extends unknown[] = unknown[]> = Severity | [Severity, ...Partial<RuleOptions>];
|
|
59
66
|
/**
|
|
60
67
|
* Rule context.
|
|
61
68
|
* @since 0.0.1
|
|
@@ -72,6 +79,28 @@ type RuleSuggest<MessageIds extends string = string> = {
|
|
|
72
79
|
data?: Record<string, unknown>;
|
|
73
80
|
fix: tseslint.ReportFixFunction;
|
|
74
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
* A collection of settings.
|
|
84
|
+
*/
|
|
85
|
+
interface SettingsConfig {
|
|
86
|
+
[key: string]: unknown;
|
|
87
|
+
}
|
|
88
|
+
interface CompatibleRule {
|
|
89
|
+
meta: Record<string, any>;
|
|
90
|
+
create: (...args: any[]) => any;
|
|
91
|
+
}
|
|
92
|
+
interface CompatiblePlugin {
|
|
93
|
+
meta: {
|
|
94
|
+
name: string;
|
|
95
|
+
version: string;
|
|
96
|
+
};
|
|
97
|
+
rules: Record<string, CompatibleRule>;
|
|
98
|
+
}
|
|
99
|
+
interface CompatibleConfig {
|
|
100
|
+
name?: string;
|
|
101
|
+
rules?: Record<string, RuleConfig>;
|
|
102
|
+
settings?: SettingsConfig;
|
|
103
|
+
}
|
|
75
104
|
//#endregion
|
|
76
105
|
//#region src/JsxConfig/JsxConfig.d.ts
|
|
77
106
|
declare const JsxEmit: {
|
|
@@ -284,4 +313,4 @@ declare const IMPLICIT_RETURN_ARROW_FUNCTION_EXPRESSION = "ArrowFunctionExpressi
|
|
|
284
313
|
declare const OBJECT_DESTRUCTURING_VARIABLE_DECLARATOR: string;
|
|
285
314
|
declare const DISPLAY_NAME_ASSIGNMENT_EXPRESSION: string;
|
|
286
315
|
//#endregion
|
|
287
|
-
export { ContextDetection_d_exports as ContextDetection, index_d_exports as JsxConfig, index_d_exports$1 as LanguagePreference, RegExp_d_exports as RegExp, Reporter_d_exports as Reporter,
|
|
316
|
+
export { CompatibleConfig, CompatiblePlugin, CompatibleRule, ContextDetection_d_exports as ContextDetection, index_d_exports as JsxConfig, index_d_exports$1 as LanguagePreference, RegExp_d_exports as RegExp, Reporter_d_exports as Reporter, RuleConfig, RuleContext, RuleFeature, RulePolicy, RuleSuggest, Selector_d_exports as Selector, SettingsConfig, Severity, SeverityLevel, SeverityName };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/kit",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.159",
|
|
4
4
|
"description": "ESLint React's plugin kit for building plugins and rules.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"@typescript-eslint/utils": "^8.41.0",
|
|
31
31
|
"ts-pattern": "^5.8.0",
|
|
32
32
|
"zod": "^4.1.5",
|
|
33
|
-
"@eslint-react/ast": "2.0.0-next.
|
|
34
|
-
"@eslint-react/eff": "2.0.0-next.
|
|
33
|
+
"@eslint-react/ast": "2.0.0-next.159",
|
|
34
|
+
"@eslint-react/eff": "2.0.0-next.159"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@tsconfig/node22": "^22.0.2",
|