eslint-plugin-valibot 0.1.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.
@@ -0,0 +1,154 @@
1
+ import { TSESLint } from '@typescript-eslint/utils';
2
+ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
3
+
4
+ type RuleModule = TSESLint.RuleModule<string, readonly unknown[]>;
5
+ type RuleMap = Record<string, RuleModule>;
6
+ type RuleSeverity = 'off' | 'warn' | 'error' | 0 | 1 | 2;
7
+ type RuleEntry = RuleSeverity | readonly [RuleSeverity, ...unknown[]];
8
+ type RulesConfig = Record<string, RuleEntry>;
9
+ type ConfigName = 'recommended' | 'strict' | 'stylistic';
10
+ interface RuleRegistryEntry {
11
+ name: string;
12
+ rule: RuleModule;
13
+ configs: Partial<Record<ConfigName, RuleEntry>>;
14
+ typeScriptOnly?: boolean;
15
+ }
16
+ interface FlatConfig {
17
+ name?: string;
18
+ files?: string[];
19
+ ignores?: string[];
20
+ plugins?: Record<string, unknown>;
21
+ rules?: RulesConfig;
22
+ languageOptions?: Record<string, unknown>;
23
+ }
24
+ type FlatConfigArray = FlatConfig[];
25
+ interface LegacyConfig {
26
+ plugins?: string[];
27
+ extends?: string[];
28
+ rules?: RulesConfig;
29
+ overrides?: Array<Record<string, unknown>>;
30
+ }
31
+ type LegacyConfigMap = Record<string, LegacyConfig>;
32
+ type FlatConfigMap = Record<string, FlatConfigArray>;
33
+ interface FlatPluginShape {
34
+ meta: {
35
+ name: string;
36
+ version?: string;
37
+ };
38
+ rules: RuleMap;
39
+ }
40
+ interface ValibotPlugin extends FlatPluginShape {
41
+ configs: LegacyConfigMap;
42
+ flatConfigs: FlatConfigMap;
43
+ }
44
+
45
+ declare const flatConfigs: FlatConfigMap;
46
+ declare const configs: {
47
+ recommended: LegacyConfig;
48
+ strict: LegacyConfig;
49
+ stylistic: LegacyConfig;
50
+ };
51
+ declare const plugin: ValibotPlugin;
52
+
53
+ declare const STYLES: readonly ["namespace", "named"];
54
+ type Style = (typeof STYLES)[number];
55
+ type Options$2 = [
56
+ {
57
+ namespaceAlias?: string;
58
+ style?: Style;
59
+ }
60
+ ];
61
+ type MessageIds$1 = 'namespaceAlias' | 'preferNamed' | 'preferNamespace';
62
+ declare const consistentImport: _typescript_eslint_utils_ts_eslint.RuleModule<MessageIds$1, Options$2, unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
63
+ name: string;
64
+ };
65
+
66
+ declare const CONVENTIONS: readonly ["same-name", "suffix"];
67
+ declare const SCOPES: readonly ["exported", "all"];
68
+ type Convention = (typeof CONVENTIONS)[number];
69
+ type Scope = (typeof SCOPES)[number];
70
+ type Options$1 = [
71
+ {
72
+ allowDataSuffix?: boolean;
73
+ convention?: Convention;
74
+ dataSuffix?: string;
75
+ inputSuffix?: string;
76
+ outputSuffix?: string;
77
+ schemaSuffix?: string;
78
+ scope?: Scope;
79
+ }
80
+ ];
81
+ type MessageIds = 'schemaNameConvention' | 'typeNameConvention';
82
+ declare const consistentSchemaConvention: _typescript_eslint_utils_ts_eslint.RuleModule<MessageIds, Options$1, unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
83
+ name: string;
84
+ };
85
+
86
+ declare const noDuplicatePipeActions: _typescript_eslint_utils_ts_eslint.RuleModule<"duplicatePipeAction", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
87
+ name: string;
88
+ };
89
+
90
+ declare const noRecreatedSchemas: _typescript_eslint_utils_ts_eslint.RuleModule<"noRecreatedSchema", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
91
+ name: string;
92
+ };
93
+
94
+ declare const noSchemaAsType: _typescript_eslint_utils_ts_eslint.RuleModule<"noSchemaAsType", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
95
+ name: string;
96
+ };
97
+
98
+ declare const preferPicklist: _typescript_eslint_utils_ts_eslint.RuleModule<"preferPicklist", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
99
+ name: string;
100
+ };
101
+
102
+ declare const preferNullableOverUnionNull: _typescript_eslint_utils_ts_eslint.RuleModule<"preferNullable", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
103
+ name: string;
104
+ };
105
+
106
+ declare const preferOptionalOverUnionUndefined: _typescript_eslint_utils_ts_eslint.RuleModule<"preferOptional", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
107
+ name: string;
108
+ };
109
+
110
+ declare const preferVariant: _typescript_eslint_utils_ts_eslint.RuleModule<"preferVariant", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
111
+ name: string;
112
+ };
113
+
114
+ declare const preferNullish: _typescript_eslint_utils_ts_eslint.RuleModule<"preferNullish", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
115
+ name: string;
116
+ };
117
+
118
+ declare const noUnguardedParse: _typescript_eslint_utils_ts_eslint.RuleModule<"unguardedParserCall", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
119
+ name: string;
120
+ };
121
+
122
+ declare const noRedundantSchemaWrappers: _typescript_eslint_utils_ts_eslint.RuleModule<"redundantWrapper", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
123
+ name: string;
124
+ };
125
+
126
+ declare const noAnySchema: _typescript_eslint_utils_ts_eslint.RuleModule<"avoidAnySchema", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
127
+ name: string;
128
+ };
129
+
130
+ declare const OBJECT_SCHEMA_TYPES: readonly ["object", "looseObject", "strictObject"];
131
+ type ObjectSchemaType = (typeof OBJECT_SCHEMA_TYPES)[number];
132
+ type Options = [
133
+ {
134
+ allow?: ObjectSchemaType[];
135
+ }
136
+ ];
137
+ declare const noLooseObject: _typescript_eslint_utils_ts_eslint.RuleModule<"disallowedObjectSchemaType", Options, unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
138
+ name: string;
139
+ };
140
+
141
+ declare const noUnknownSchema: _typescript_eslint_utils_ts_eslint.RuleModule<"avoidUnknownSchema", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
142
+ name: string;
143
+ };
144
+
145
+ declare const noTransformInRecordKey: TSESLint.RuleModule<"transformInRecordKey", [], unknown, TSESLint.RuleListener> & {
146
+ name: string;
147
+ };
148
+
149
+ declare const ruleRegistry: RuleRegistryEntry[];
150
+ declare const rules: RuleMap;
151
+ declare function getRulesForConfig(configName: ConfigName): RulesConfig;
152
+ declare function getRuleNamesForConfig(configName: ConfigName): string[];
153
+
154
+ export { type ConfigName, type FlatConfig, type FlatConfigArray, type FlatConfigMap, type FlatPluginShape, type LegacyConfig, type LegacyConfigMap, type RuleEntry, type RuleMap, type RuleModule, type RuleRegistryEntry, type RuleSeverity, type RulesConfig, type ValibotPlugin, configs, consistentImport, consistentSchemaConvention, plugin as default, flatConfigs, getRuleNamesForConfig, getRulesForConfig, noAnySchema, noDuplicatePipeActions, noLooseObject, noRecreatedSchemas, noRedundantSchemaWrappers, noSchemaAsType, noTransformInRecordKey, noUnguardedParse, noUnknownSchema, preferNullableOverUnionNull, preferNullish, preferOptionalOverUnionUndefined, preferPicklist, preferVariant, ruleRegistry, rules };