@vp-tw/eslint-config 0.0.1 → 0.0.3
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/README.md +7 -3
- package/dist/configs/mdx.d.ts +2 -227
- package/dist/configs/mdx.js +32 -15
- package/dist/configs/prettier.d.ts +1 -2
- package/dist/configs/prettier.js +2 -2
- package/dist/configs/storybook.d.ts +2 -0
- package/dist/configs/storybook.js +30 -0
- package/dist/eslint-typegen.d.ts +80 -0
- package/dist/esm/configs/mdx.d.ts +2 -227
- package/dist/esm/configs/mdx.mjs +43 -20
- package/dist/esm/configs/prettier.d.ts +1 -2
- package/dist/esm/configs/prettier.mjs +2 -2
- package/dist/esm/configs/storybook.d.ts +2 -0
- package/dist/esm/configs/storybook.mjs +15 -0
- package/dist/esm/eslint-typegen.d.ts +80 -0
- package/dist/esm/utils/renameRules.d.ts +3 -0
- package/dist/esm/utils/renameRules.mjs +5 -0
- package/dist/esm/vdustr.d.ts +1 -1
- package/dist/esm/vdustr.mjs +98 -51
- package/dist/utils/renameRules.d.ts +3 -0
- package/dist/utils/renameRules.js +10 -0
- package/dist/vdustr.d.ts +1 -1
- package/dist/vdustr.js +94 -51
- package/package.json +10 -6
- package/scripts/copy.ts +23 -0
- package/scripts/typegen.ts +14 -3
- package/src/configs/mdx.ts +24 -7
- package/src/configs/prettier.ts +5 -5
- package/src/configs/storybook.ts +20 -0
- package/src/eslint-typegen.d.ts +80 -0
- package/src/tsconfig.json +1 -2
- package/src/utils/renameRules.ts +7 -0
- package/src/vdustr.ts +87 -25
- package/tsconfig.json +1 -1
- /package/{lib → src/lib}/eslint-plugin-react-compiler.ts +0 -0
package/README.md
CHANGED
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
ViPro's ESLint configuration.
|
|
4
4
|
|
|
5
5
|
- Built on top of [antfu/eslint-config](https://github.com/antfu/eslint-config).
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
6
|
+
- Integrates with:
|
|
7
|
+
- [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier)
|
|
8
|
+
- [eslint-mdx](https://github.com/mdx-js/eslint-mdx).
|
|
9
|
+
- [eslint-plugin-storybook](https://github.com/storybookjs/eslint-plugin-storybook)
|
|
10
|
+
- Fine-tuned to provide an opinionated, optimal DX. Please copy the VSCode settings from [eslint-config.code-workspace](https://github.com/VdustR/eslint-config/blob/main/eslint-config.code-workspace).
|
|
11
|
+
|
|
12
|
+
Click [here](https://vdustr.dev/eslint-config) to preview the ESLint inspection.
|
|
9
13
|
|
|
10
14
|
## License
|
|
11
15
|
|
package/dist/configs/mdx.d.ts
CHANGED
|
@@ -1,236 +1,11 @@
|
|
|
1
1
|
import type { TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
2
2
|
import type { DistributiveOmit } from "@mui/types";
|
|
3
|
-
import type { Config } from "../types";
|
|
4
3
|
import * as mdxPlugin from "eslint-plugin-mdx";
|
|
5
4
|
declare namespace mdx {
|
|
6
5
|
interface Options extends DistributiveOmit<TypedFlatConfigItem, "processor"> {
|
|
7
6
|
processorOptions?: mdxPlugin.ProcessorOptions;
|
|
8
|
-
flatCodeBlocks?: boolean |
|
|
7
|
+
flatCodeBlocks?: boolean | TypedFlatConfigItem;
|
|
9
8
|
}
|
|
10
9
|
}
|
|
11
|
-
declare const mdx: ({ flatCodeBlocks, processorOptions, ...options }?: mdx.Options) =>
|
|
12
|
-
length: number;
|
|
13
|
-
toString(): string;
|
|
14
|
-
toLocaleString(): string;
|
|
15
|
-
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
|
|
16
|
-
pop(): TypedFlatConfigItem | undefined;
|
|
17
|
-
push(...items: TypedFlatConfigItem[]): number;
|
|
18
|
-
concat(...items: ConcatArray<TypedFlatConfigItem>[]): TypedFlatConfigItem[];
|
|
19
|
-
concat(...items: (TypedFlatConfigItem | ConcatArray<TypedFlatConfigItem>)[]): TypedFlatConfigItem[];
|
|
20
|
-
join(separator?: string): string;
|
|
21
|
-
reverse(): TypedFlatConfigItem[];
|
|
22
|
-
shift(): TypedFlatConfigItem | undefined;
|
|
23
|
-
slice(start?: number, end?: number): TypedFlatConfigItem[];
|
|
24
|
-
sort(compareFn?: ((a: TypedFlatConfigItem, b: TypedFlatConfigItem) => number) | undefined): TypedFlatConfigItem[];
|
|
25
|
-
splice(start: number, deleteCount?: number): TypedFlatConfigItem[];
|
|
26
|
-
splice(start: number, deleteCount: number, ...items: TypedFlatConfigItem[]): TypedFlatConfigItem[];
|
|
27
|
-
unshift(...items: TypedFlatConfigItem[]): number;
|
|
28
|
-
indexOf(searchElement: TypedFlatConfigItem, fromIndex?: number): number;
|
|
29
|
-
lastIndexOf(searchElement: TypedFlatConfigItem, fromIndex?: number): number;
|
|
30
|
-
every<S extends TypedFlatConfigItem>(predicate: (value: TypedFlatConfigItem, index: number, array: TypedFlatConfigItem[]) => value is S, thisArg?: any): this is S[];
|
|
31
|
-
every(predicate: (value: TypedFlatConfigItem, index: number, array: TypedFlatConfigItem[]) => unknown, thisArg?: any): boolean;
|
|
32
|
-
some(predicate: (value: TypedFlatConfigItem, index: number, array: TypedFlatConfigItem[]) => unknown, thisArg?: any): boolean;
|
|
33
|
-
forEach(callbackfn: (value: TypedFlatConfigItem, index: number, array: TypedFlatConfigItem[]) => void, thisArg?: any): void;
|
|
34
|
-
map<U>(callbackfn: (value: TypedFlatConfigItem, index: number, array: TypedFlatConfigItem[]) => U, thisArg?: any): U[];
|
|
35
|
-
filter<S extends TypedFlatConfigItem>(predicate: (value: TypedFlatConfigItem, index: number, array: TypedFlatConfigItem[]) => value is S, thisArg?: any): S[];
|
|
36
|
-
filter(predicate: (value: TypedFlatConfigItem, index: number, array: TypedFlatConfigItem[]) => unknown, thisArg?: any): TypedFlatConfigItem[];
|
|
37
|
-
reduce(callbackfn: (previousValue: TypedFlatConfigItem, currentValue: TypedFlatConfigItem, currentIndex: number, array: TypedFlatConfigItem[]) => TypedFlatConfigItem): TypedFlatConfigItem;
|
|
38
|
-
reduce(callbackfn: (previousValue: TypedFlatConfigItem, currentValue: TypedFlatConfigItem, currentIndex: number, array: TypedFlatConfigItem[]) => TypedFlatConfigItem, initialValue: TypedFlatConfigItem): TypedFlatConfigItem;
|
|
39
|
-
reduce<U>(callbackfn: (previousValue: U, currentValue: TypedFlatConfigItem, currentIndex: number, array: TypedFlatConfigItem[]) => U, initialValue: U): U;
|
|
40
|
-
reduceRight(callbackfn: (previousValue: TypedFlatConfigItem, currentValue: TypedFlatConfigItem, currentIndex: number, array: TypedFlatConfigItem[]) => TypedFlatConfigItem): TypedFlatConfigItem;
|
|
41
|
-
reduceRight(callbackfn: (previousValue: TypedFlatConfigItem, currentValue: TypedFlatConfigItem, currentIndex: number, array: TypedFlatConfigItem[]) => TypedFlatConfigItem, initialValue: TypedFlatConfigItem): TypedFlatConfigItem;
|
|
42
|
-
reduceRight<U>(callbackfn: (previousValue: U, currentValue: TypedFlatConfigItem, currentIndex: number, array: TypedFlatConfigItem[]) => U, initialValue: U): U;
|
|
43
|
-
find<S extends TypedFlatConfigItem>(predicate: (value: TypedFlatConfigItem, index: number, obj: TypedFlatConfigItem[]) => value is S, thisArg?: any): S | undefined;
|
|
44
|
-
find(predicate: (value: TypedFlatConfigItem, index: number, obj: TypedFlatConfigItem[]) => unknown, thisArg?: any): TypedFlatConfigItem | undefined;
|
|
45
|
-
findIndex(predicate: (value: TypedFlatConfigItem, index: number, obj: TypedFlatConfigItem[]) => unknown, thisArg?: any): number;
|
|
46
|
-
fill(value: TypedFlatConfigItem, start?: number, end?: number): TypedFlatConfigItem[];
|
|
47
|
-
copyWithin(target: number, start: number, end?: number): TypedFlatConfigItem[];
|
|
48
|
-
entries(): ArrayIterator<[number, TypedFlatConfigItem]>;
|
|
49
|
-
keys(): ArrayIterator<number>;
|
|
50
|
-
values(): ArrayIterator<TypedFlatConfigItem>;
|
|
51
|
-
includes(searchElement: TypedFlatConfigItem, fromIndex?: number): boolean;
|
|
52
|
-
flatMap<U, This = undefined>(callback: (this: This, value: TypedFlatConfigItem, index: number, array: TypedFlatConfigItem[]) => U | readonly U[], thisArg?: This | undefined): U[];
|
|
53
|
-
flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
|
|
54
|
-
[Symbol.iterator](): ArrayIterator<TypedFlatConfigItem>;
|
|
55
|
-
[Symbol.unscopables]: {
|
|
56
|
-
[x: number]: boolean | undefined;
|
|
57
|
-
length?: boolean | undefined;
|
|
58
|
-
toString?: boolean | undefined;
|
|
59
|
-
toLocaleString?: boolean | undefined;
|
|
60
|
-
pop?: boolean | undefined;
|
|
61
|
-
push?: boolean | undefined;
|
|
62
|
-
concat?: boolean | undefined;
|
|
63
|
-
join?: boolean | undefined;
|
|
64
|
-
reverse?: boolean | undefined;
|
|
65
|
-
shift?: boolean | undefined;
|
|
66
|
-
slice?: boolean | undefined;
|
|
67
|
-
sort?: boolean | undefined;
|
|
68
|
-
splice?: boolean | undefined;
|
|
69
|
-
unshift?: boolean | undefined;
|
|
70
|
-
indexOf?: boolean | undefined;
|
|
71
|
-
lastIndexOf?: boolean | undefined;
|
|
72
|
-
every?: boolean | undefined;
|
|
73
|
-
some?: boolean | undefined;
|
|
74
|
-
forEach?: boolean | undefined;
|
|
75
|
-
map?: boolean | undefined;
|
|
76
|
-
filter?: boolean | undefined;
|
|
77
|
-
reduce?: boolean | undefined;
|
|
78
|
-
reduceRight?: boolean | undefined;
|
|
79
|
-
find?: boolean | undefined;
|
|
80
|
-
findIndex?: boolean | undefined;
|
|
81
|
-
fill?: boolean | undefined;
|
|
82
|
-
copyWithin?: boolean | undefined;
|
|
83
|
-
entries?: boolean | undefined;
|
|
84
|
-
keys?: boolean | undefined;
|
|
85
|
-
values?: boolean | undefined;
|
|
86
|
-
includes?: boolean | undefined;
|
|
87
|
-
flatMap?: boolean | undefined;
|
|
88
|
-
flat?: boolean | undefined;
|
|
89
|
-
[Symbol.iterator]?: boolean | undefined;
|
|
90
|
-
readonly [Symbol.unscopables]?: boolean | undefined;
|
|
91
|
-
at?: boolean | undefined;
|
|
92
|
-
};
|
|
93
|
-
at(index: number): TypedFlatConfigItem | undefined;
|
|
94
|
-
name: string;
|
|
95
|
-
files?: Array<string | string[]>;
|
|
96
|
-
ignores?: string[];
|
|
97
|
-
language?: string;
|
|
98
|
-
languageOptions?: import("eslint").Linter.LanguageOptions;
|
|
99
|
-
linterOptions?: import("eslint").Linter.LinterOptions;
|
|
100
|
-
processor?: string | import("eslint").Linter.Processor;
|
|
101
|
-
plugins?: Record<string, import("eslint").ESLint.Plugin>;
|
|
102
|
-
rules?: Partial<import("eslint").Linter.RulesRecord> | undefined;
|
|
103
|
-
settings?: Record<string, unknown>;
|
|
104
|
-
} | {
|
|
105
|
-
[Symbol.toStringTag]: string;
|
|
106
|
-
name: string;
|
|
107
|
-
files?: Array<string | string[]>;
|
|
108
|
-
ignores?: string[];
|
|
109
|
-
language?: string;
|
|
110
|
-
languageOptions?: import("eslint").Linter.LanguageOptions;
|
|
111
|
-
linterOptions?: import("eslint").Linter.LinterOptions;
|
|
112
|
-
processor?: string | import("eslint").Linter.Processor;
|
|
113
|
-
plugins?: Record<string, import("eslint").ESLint.Plugin>;
|
|
114
|
-
rules?: Partial<import("eslint").Linter.RulesRecord> | undefined;
|
|
115
|
-
settings?: Record<string, unknown>;
|
|
116
|
-
} | {
|
|
117
|
-
length: number;
|
|
118
|
-
toString(): string;
|
|
119
|
-
toLocaleString(): string;
|
|
120
|
-
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
|
|
121
|
-
pop(): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord> | undefined;
|
|
122
|
-
push(...items: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]): number;
|
|
123
|
-
concat(...items: ConcatArray<import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>>[]): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
124
|
-
concat(...items: (import("eslint").Linter.Config<import("eslint").Linter.RulesRecord> | ConcatArray<import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>>)[]): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
125
|
-
join(separator?: string): string;
|
|
126
|
-
reverse(): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
127
|
-
shift(): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord> | undefined;
|
|
128
|
-
slice(start?: number, end?: number): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
129
|
-
sort(compareFn?: ((a: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, b: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>) => number) | undefined): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
130
|
-
splice(start: number, deleteCount?: number): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
131
|
-
splice(start: number, deleteCount: number, ...items: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
132
|
-
unshift(...items: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]): number;
|
|
133
|
-
indexOf(searchElement: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, fromIndex?: number): number;
|
|
134
|
-
lastIndexOf(searchElement: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, fromIndex?: number): number;
|
|
135
|
-
every<S extends import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>>(predicate: (value: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, index: number, array: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => value is S, thisArg?: any): this is S[];
|
|
136
|
-
every(predicate: (value: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, index: number, array: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => unknown, thisArg?: any): boolean;
|
|
137
|
-
some(predicate: (value: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, index: number, array: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => unknown, thisArg?: any): boolean;
|
|
138
|
-
forEach(callbackfn: (value: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, index: number, array: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => void, thisArg?: any): void;
|
|
139
|
-
map<U>(callbackfn: (value: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, index: number, array: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => U, thisArg?: any): U[];
|
|
140
|
-
filter<S extends import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>>(predicate: (value: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, index: number, array: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => value is S, thisArg?: any): S[];
|
|
141
|
-
filter(predicate: (value: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, index: number, array: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => unknown, thisArg?: any): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
142
|
-
reduce(callbackfn: (previousValue: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, currentValue: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, currentIndex: number, array: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>;
|
|
143
|
-
reduce(callbackfn: (previousValue: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, currentValue: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, currentIndex: number, array: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, initialValue: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>;
|
|
144
|
-
reduce<U>(callbackfn: (previousValue: U, currentValue: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, currentIndex: number, array: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => U, initialValue: U): U;
|
|
145
|
-
reduceRight(callbackfn: (previousValue: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, currentValue: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, currentIndex: number, array: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>;
|
|
146
|
-
reduceRight(callbackfn: (previousValue: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, currentValue: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, currentIndex: number, array: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, initialValue: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>;
|
|
147
|
-
reduceRight<U>(callbackfn: (previousValue: U, currentValue: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, currentIndex: number, array: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => U, initialValue: U): U;
|
|
148
|
-
find<S extends import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>>(predicate: (value: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, index: number, obj: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => value is S, thisArg?: any): S | undefined;
|
|
149
|
-
find(predicate: (value: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, index: number, obj: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => unknown, thisArg?: any): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord> | undefined;
|
|
150
|
-
findIndex(predicate: (value: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, index: number, obj: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => unknown, thisArg?: any): number;
|
|
151
|
-
fill(value: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, start?: number, end?: number): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
152
|
-
copyWithin(target: number, start: number, end?: number): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
153
|
-
entries(): ArrayIterator<[number, import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>]>;
|
|
154
|
-
keys(): ArrayIterator<number>;
|
|
155
|
-
values(): ArrayIterator<import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>>;
|
|
156
|
-
includes(searchElement: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, fromIndex?: number): boolean;
|
|
157
|
-
flatMap<U, This = undefined>(callback: (this: This, value: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>, index: number, array: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => U | readonly U[], thisArg?: This | undefined): U[];
|
|
158
|
-
flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
|
|
159
|
-
[Symbol.iterator](): ArrayIterator<import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>>;
|
|
160
|
-
[Symbol.unscopables]: {
|
|
161
|
-
[x: number]: boolean | undefined;
|
|
162
|
-
length?: boolean | undefined;
|
|
163
|
-
toString?: boolean | undefined;
|
|
164
|
-
toLocaleString?: boolean | undefined;
|
|
165
|
-
pop?: boolean | undefined;
|
|
166
|
-
push?: boolean | undefined;
|
|
167
|
-
concat?: boolean | undefined;
|
|
168
|
-
join?: boolean | undefined;
|
|
169
|
-
reverse?: boolean | undefined;
|
|
170
|
-
shift?: boolean | undefined;
|
|
171
|
-
slice?: boolean | undefined;
|
|
172
|
-
sort?: boolean | undefined;
|
|
173
|
-
splice?: boolean | undefined;
|
|
174
|
-
unshift?: boolean | undefined;
|
|
175
|
-
indexOf?: boolean | undefined;
|
|
176
|
-
lastIndexOf?: boolean | undefined;
|
|
177
|
-
every?: boolean | undefined;
|
|
178
|
-
some?: boolean | undefined;
|
|
179
|
-
forEach?: boolean | undefined;
|
|
180
|
-
map?: boolean | undefined;
|
|
181
|
-
filter?: boolean | undefined;
|
|
182
|
-
reduce?: boolean | undefined;
|
|
183
|
-
reduceRight?: boolean | undefined;
|
|
184
|
-
find?: boolean | undefined;
|
|
185
|
-
findIndex?: boolean | undefined;
|
|
186
|
-
fill?: boolean | undefined;
|
|
187
|
-
copyWithin?: boolean | undefined;
|
|
188
|
-
entries?: boolean | undefined;
|
|
189
|
-
keys?: boolean | undefined;
|
|
190
|
-
values?: boolean | undefined;
|
|
191
|
-
includes?: boolean | undefined;
|
|
192
|
-
flatMap?: boolean | undefined;
|
|
193
|
-
flat?: boolean | undefined;
|
|
194
|
-
[Symbol.iterator]?: boolean | undefined;
|
|
195
|
-
readonly [Symbol.unscopables]?: boolean | undefined;
|
|
196
|
-
at?: boolean | undefined;
|
|
197
|
-
};
|
|
198
|
-
at(index: number): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord> | undefined;
|
|
199
|
-
name: string;
|
|
200
|
-
files?: Array<string | string[]>;
|
|
201
|
-
ignores?: string[];
|
|
202
|
-
language?: string;
|
|
203
|
-
languageOptions?: import("eslint").Linter.LanguageOptions;
|
|
204
|
-
linterOptions?: import("eslint").Linter.LinterOptions;
|
|
205
|
-
processor?: string | import("eslint").Linter.Processor;
|
|
206
|
-
plugins?: Record<string, import("eslint").ESLint.Plugin>;
|
|
207
|
-
rules?: Partial<import("eslint").Linter.RulesRecord> | undefined;
|
|
208
|
-
settings?: Record<string, unknown>;
|
|
209
|
-
} | {
|
|
210
|
-
then<TResult1 = TypedFlatConfigItem | TypedFlatConfigItem[] | import("eslint-flat-config-utils/index").FlatConfigComposer<any, any> | import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[], TResult2 = never>(onfulfilled?: ((value: TypedFlatConfigItem | TypedFlatConfigItem[] | import("eslint-flat-config-utils/index").FlatConfigComposer<any, any> | import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
211
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<TypedFlatConfigItem | TypedFlatConfigItem[] | import("eslint-flat-config-utils/index").FlatConfigComposer<any, any> | import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[] | TResult>;
|
|
212
|
-
finally(onfinally?: (() => void) | null | undefined): Promise<TypedFlatConfigItem | TypedFlatConfigItem[] | import("eslint-flat-config-utils/index").FlatConfigComposer<any, any> | import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]>;
|
|
213
|
-
[Symbol.toStringTag]: string;
|
|
214
|
-
name: string;
|
|
215
|
-
files?: Array<string | string[]>;
|
|
216
|
-
ignores?: string[];
|
|
217
|
-
language?: string;
|
|
218
|
-
languageOptions?: import("eslint").Linter.LanguageOptions;
|
|
219
|
-
linterOptions?: import("eslint").Linter.LinterOptions;
|
|
220
|
-
processor?: string | import("eslint").Linter.Processor;
|
|
221
|
-
plugins?: Record<string, import("eslint").ESLint.Plugin>;
|
|
222
|
-
rules?: Partial<import("eslint").Linter.RulesRecord> | undefined;
|
|
223
|
-
settings?: Record<string, unknown>;
|
|
224
|
-
} | {
|
|
225
|
-
name: string;
|
|
226
|
-
files?: Array<string | string[]>;
|
|
227
|
-
ignores?: string[];
|
|
228
|
-
language?: string;
|
|
229
|
-
languageOptions?: import("eslint").Linter.LanguageOptions;
|
|
230
|
-
linterOptions?: import("eslint").Linter.LinterOptions;
|
|
231
|
-
processor?: string | import("eslint").Linter.Processor;
|
|
232
|
-
rules?: Partial<import("eslint").Linter.RulesRecord> | undefined;
|
|
233
|
-
settings?: Record<string, unknown>;
|
|
234
|
-
plugins?: Record<string, any> | undefined;
|
|
235
|
-
})[];
|
|
10
|
+
declare const mdx: ({ flatCodeBlocks, processorOptions, ...options }?: mdx.Options) => TypedFlatConfigItem[];
|
|
236
11
|
export { mdx };
|
package/dist/configs/mdx.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.mdx = void 0;
|
|
7
|
+
var _eslintConfig = require("@antfu/eslint-config");
|
|
7
8
|
var mdxPlugin = _interopRequireWildcard(require("eslint-plugin-mdx"));
|
|
8
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
10
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -11,20 +12,36 @@ const mdx = ({
|
|
|
11
12
|
flatCodeBlocks = true,
|
|
12
13
|
processorOptions,
|
|
13
14
|
...options
|
|
14
|
-
} = {}) =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
} = {}) => {
|
|
16
|
+
const flatCodeBlocksOptions = typeof flatCodeBlocks !== "object" ? {} : flatCodeBlocks;
|
|
17
|
+
const configs = [{
|
|
18
|
+
name: "vdustr/mdx",
|
|
19
|
+
...mdxPlugin.flat,
|
|
20
|
+
...options,
|
|
21
|
+
rules: {
|
|
22
|
+
...(0, _eslintConfig.renameRules)({
|
|
23
|
+
...mdxPlugin.flat.rules
|
|
24
|
+
}, _eslintConfig.defaultPluginRenaming),
|
|
25
|
+
...options.rules
|
|
26
|
+
},
|
|
27
|
+
processor: mdxPlugin.createRemarkProcessor({
|
|
28
|
+
lintCodeBlocks: Boolean(flatCodeBlocks),
|
|
29
|
+
...processorOptions,
|
|
30
|
+
languageMapper: {
|
|
31
|
+
...processorOptions?.languageMapper
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
}, ...(!flatCodeBlocks ? [] : [{
|
|
35
|
+
name: "vdustr/mdx/flat-code-blocks",
|
|
36
|
+
...mdxPlugin.flatCodeBlocks,
|
|
37
|
+
...flatCodeBlocksOptions,
|
|
38
|
+
rules: {
|
|
39
|
+
...(0, _eslintConfig.renameRules)({
|
|
40
|
+
...mdxPlugin.flatCodeBlocks.rules
|
|
41
|
+
}, _eslintConfig.defaultPluginRenaming),
|
|
42
|
+
...flatCodeBlocksOptions.rules
|
|
23
43
|
}
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
...mdxPlugin.flatCodeBlocks,
|
|
28
|
-
...(typeof flatCodeBlocks !== "object" ? null : flatCodeBlocks)
|
|
29
|
-
}])];
|
|
44
|
+
}])];
|
|
45
|
+
return configs;
|
|
46
|
+
};
|
|
30
47
|
exports.mdx = mdx;
|
package/dist/configs/prettier.js
CHANGED
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.prettier = void 0;
|
|
7
|
-
var _eslintConfig = require("@antfu/eslint-config");
|
|
8
7
|
var _eslintConfigPrettier = _interopRequireDefault(require("eslint-config-prettier"));
|
|
8
|
+
var _renameRules = require("../utils/renameRules");
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
const prettier = exports.prettier = {
|
|
11
11
|
name: "vdustr/prettier",
|
|
12
12
|
..._eslintConfigPrettier.default,
|
|
13
|
-
rules: (0,
|
|
13
|
+
rules: (0, _renameRules.renameRules)(_eslintConfigPrettier.default.rules)
|
|
14
14
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.storybook = void 0;
|
|
7
|
+
var _eslintPluginStorybook = _interopRequireDefault(require("eslint-plugin-storybook"));
|
|
8
|
+
var _renameRules = require("../utils/renameRules");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const storybook = exports.storybook = _eslintPluginStorybook.default.configs["flat/csf-strict"].map(config => {
|
|
11
|
+
const allConfig = config;
|
|
12
|
+
const {
|
|
13
|
+
rules,
|
|
14
|
+
files,
|
|
15
|
+
plugins,
|
|
16
|
+
...rest
|
|
17
|
+
} = allConfig;
|
|
18
|
+
return {
|
|
19
|
+
...rest,
|
|
20
|
+
...(!rules ? null : {
|
|
21
|
+
rules: (0, _renameRules.renameRules)(rules)
|
|
22
|
+
}),
|
|
23
|
+
...(!files ? null : {
|
|
24
|
+
files
|
|
25
|
+
}),
|
|
26
|
+
...(!plugins ? null : {
|
|
27
|
+
plugins
|
|
28
|
+
})
|
|
29
|
+
};
|
|
30
|
+
});
|
package/dist/eslint-typegen.d.ts
CHANGED
|
@@ -17,10 +17,90 @@ export interface RuleOptions {
|
|
|
17
17
|
* Surfaces diagnostics from React Forget
|
|
18
18
|
*/
|
|
19
19
|
'react-compiler/react-compiler'?: Linter.RuleEntry<ReactCompilerReactCompiler>
|
|
20
|
+
/**
|
|
21
|
+
* Interactions should be awaited
|
|
22
|
+
* @see https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/await-interactions.md
|
|
23
|
+
*/
|
|
24
|
+
'storybook/await-interactions'?: Linter.RuleEntry<[]>
|
|
25
|
+
/**
|
|
26
|
+
* Pass a context when invoking play function of another story
|
|
27
|
+
* @see https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/context-in-play-function.md
|
|
28
|
+
*/
|
|
29
|
+
'storybook/context-in-play-function'?: Linter.RuleEntry<[]>
|
|
30
|
+
/**
|
|
31
|
+
* The component property should be set
|
|
32
|
+
* @see https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/csf-component.md
|
|
33
|
+
*/
|
|
34
|
+
'storybook/csf-component'?: Linter.RuleEntry<[]>
|
|
35
|
+
/**
|
|
36
|
+
* Story files should have a default export
|
|
37
|
+
* @see https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/default-exports.md
|
|
38
|
+
*/
|
|
39
|
+
'storybook/default-exports'?: Linter.RuleEntry<[]>
|
|
40
|
+
/**
|
|
41
|
+
* Deprecated hierarchy separator in title property
|
|
42
|
+
* @see https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/hierarchy-separator.md
|
|
43
|
+
*/
|
|
44
|
+
'storybook/hierarchy-separator'?: Linter.RuleEntry<[]>
|
|
45
|
+
/**
|
|
46
|
+
* Meta should only have inline properties
|
|
47
|
+
* @see https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/meta-inline-properties.md
|
|
48
|
+
*/
|
|
49
|
+
'storybook/meta-inline-properties'?: Linter.RuleEntry<StorybookMetaInlineProperties>
|
|
50
|
+
/**
|
|
51
|
+
* A story should not have a redundant name property
|
|
52
|
+
* @see https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-redundant-story-name.md
|
|
53
|
+
*/
|
|
54
|
+
'storybook/no-redundant-story-name'?: Linter.RuleEntry<[]>
|
|
55
|
+
/**
|
|
56
|
+
* storiesOf is deprecated and should not be used
|
|
57
|
+
* @see https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-stories-of.md
|
|
58
|
+
*/
|
|
59
|
+
'storybook/no-stories-of'?: Linter.RuleEntry<[]>
|
|
60
|
+
/**
|
|
61
|
+
* Do not define a title in meta
|
|
62
|
+
* @see https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-title-property-in-meta.md
|
|
63
|
+
*/
|
|
64
|
+
'storybook/no-title-property-in-meta'?: Linter.RuleEntry<[]>
|
|
65
|
+
/**
|
|
66
|
+
* This rule identifies storybook addons that are invalid because they are either not installed or contain a typo in their name.
|
|
67
|
+
* @see https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-uninstalled-addons.md
|
|
68
|
+
*/
|
|
69
|
+
'storybook/no-uninstalled-addons'?: Linter.RuleEntry<StorybookNoUninstalledAddons>
|
|
70
|
+
/**
|
|
71
|
+
* Stories should use PascalCase
|
|
72
|
+
* @see https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/prefer-pascal-case.md
|
|
73
|
+
*/
|
|
74
|
+
'storybook/prefer-pascal-case'?: Linter.RuleEntry<[]>
|
|
75
|
+
/**
|
|
76
|
+
* A story file must contain at least one story export
|
|
77
|
+
* @see https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/story-exports.md
|
|
78
|
+
*/
|
|
79
|
+
'storybook/story-exports'?: Linter.RuleEntry<[]>
|
|
80
|
+
/**
|
|
81
|
+
* Use expect from `@storybook/test` or `@storybook/jest`
|
|
82
|
+
* @see https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/use-storybook-expect.md
|
|
83
|
+
*/
|
|
84
|
+
'storybook/use-storybook-expect'?: Linter.RuleEntry<[]>
|
|
85
|
+
/**
|
|
86
|
+
* Do not use testing-library directly on stories
|
|
87
|
+
* @see https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/use-storybook-testing-library.md
|
|
88
|
+
*/
|
|
89
|
+
'storybook/use-storybook-testing-library'?: Linter.RuleEntry<[]>
|
|
20
90
|
}
|
|
21
91
|
|
|
22
92
|
/* ======= Declarations ======= */
|
|
23
93
|
// ----- react-compiler/react-compiler -----
|
|
24
94
|
type ReactCompilerReactCompiler = []|[{
|
|
25
95
|
[k: string]: unknown | undefined
|
|
96
|
+
}]
|
|
97
|
+
// ----- storybook/meta-inline-properties -----
|
|
98
|
+
type StorybookMetaInlineProperties = []|[{
|
|
99
|
+
csfVersion?: number
|
|
100
|
+
}]
|
|
101
|
+
// ----- storybook/no-uninstalled-addons -----
|
|
102
|
+
type StorybookNoUninstalledAddons = []|[{
|
|
103
|
+
packageJsonLocation?: string
|
|
104
|
+
ignore?: string[]
|
|
105
|
+
[k: string]: unknown | undefined
|
|
26
106
|
}]
|