@alextheman/eslint-plugin 5.6.1 → 5.6.2

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.cjs CHANGED
@@ -5477,7 +5477,7 @@ var rules_default = {
5477
5477
  //#endregion
5478
5478
  //#region package.json
5479
5479
  var name = "@alextheman/eslint-plugin";
5480
- var version = "5.6.1";
5480
+ var version = "5.6.2";
5481
5481
 
5482
5482
  //#endregion
5483
5483
  //#region src/alexPlugin.ts
package/dist/index.d.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Linter } from "eslint";
2
+ import { Config } from "prettier";
2
3
  import { TypeDocOptions } from "typedoc";
3
4
  import { PluginOptions } from "typedoc-plugin-markdown";
4
5
  import * as vite from "vite";
@@ -58,592 +59,6 @@ interface AlexPlugin {
58
59
  }
59
60
  declare const alexPlugin: AlexPlugin;
60
61
  //#endregion
61
- //#region node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/doc.d.ts
62
- // https://github.com/prettier/prettier/blob/next/src/document/public.js
63
- declare namespace builders {
64
- type DocCommand = Align | BreakParent | Cursor | Fill | Group | IfBreak | Indent | IndentIfBreak | Label | Line | LineSuffix | LineSuffixBoundary | Trim;
65
- type Doc = string | Doc[] | DocCommand;
66
- interface Align {
67
- type: "align";
68
- contents: Doc;
69
- n: number | string | {
70
- type: "root";
71
- };
72
- }
73
- interface BreakParent {
74
- type: "break-parent";
75
- }
76
- interface Cursor {
77
- type: "cursor";
78
- placeholder: symbol;
79
- }
80
- interface Fill {
81
- type: "fill";
82
- parts: Doc[];
83
- }
84
- interface Group {
85
- type: "group";
86
- id?: symbol;
87
- contents: Doc;
88
- break: boolean;
89
- expandedStates: Doc[];
90
- }
91
- interface HardlineWithoutBreakParent extends Line {
92
- hard: true;
93
- }
94
- interface IfBreak {
95
- type: "if-break";
96
- breakContents: Doc;
97
- flatContents: Doc;
98
- }
99
- interface Indent {
100
- type: "indent";
101
- contents: Doc;
102
- }
103
- interface IndentIfBreak {
104
- type: "indent-if-break";
105
- }
106
- interface Label {
107
- type: "label";
108
- label: any;
109
- contents: Doc;
110
- }
111
- interface Line {
112
- type: "line";
113
- soft?: boolean | undefined;
114
- hard?: boolean | undefined;
115
- literal?: boolean | undefined;
116
- }
117
- interface LineSuffix {
118
- type: "line-suffix";
119
- contents: Doc;
120
- }
121
- interface LineSuffixBoundary {
122
- type: "line-suffix-boundary";
123
- }
124
- interface LiterallineWithoutBreakParent extends Line {
125
- hard: true;
126
- literal: true;
127
- }
128
- type LiteralLine = [LiterallineWithoutBreakParent, BreakParent];
129
- interface Softline extends Line {
130
- soft: true;
131
- }
132
- type Hardline = [HardlineWithoutBreakParent, BreakParent];
133
- interface Trim {
134
- type: "trim";
135
- }
136
- interface GroupOptions {
137
- shouldBreak?: boolean | undefined;
138
- id?: symbol | undefined;
139
- }
140
- function addAlignmentToDoc(doc: Doc, size: number, tabWidth: number): Doc;
141
- /** @see [align](https://github.com/prettier/prettier/blob/main/commands.md#align) */
142
- function align(widthOrString: Align["n"], doc: Doc): Align;
143
- /** @see [breakParent](https://github.com/prettier/prettier/blob/main/commands.md#breakparent) */
144
- const breakParent: BreakParent;
145
- /** @see [conditionalGroup](https://github.com/prettier/prettier/blob/main/commands.md#conditionalgroup) */
146
- function conditionalGroup(alternatives: Doc[], options?: GroupOptions): Group;
147
- /** @see [dedent](https://github.com/prettier/prettier/blob/main/commands.md#dedent) */
148
- function dedent(doc: Doc): Align;
149
- /** @see [dedentToRoot](https://github.com/prettier/prettier/blob/main/commands.md#dedenttoroot) */
150
- function dedentToRoot(doc: Doc): Align;
151
- /** @see [fill](https://github.com/prettier/prettier/blob/main/commands.md#fill) */
152
- function fill(docs: Doc[]): Fill;
153
- /** @see [group](https://github.com/prettier/prettier/blob/main/commands.md#group) */
154
- function group(doc: Doc, opts?: GroupOptions): Group;
155
- /** @see [hardline](https://github.com/prettier/prettier/blob/main/commands.md#hardline) */
156
- const hardline: Hardline;
157
- /** @see [hardlineWithoutBreakParent](https://github.com/prettier/prettier/blob/main/commands.md#hardlinewithoutbreakparent-and-literallinewithoutbreakparent) */
158
- const hardlineWithoutBreakParent: HardlineWithoutBreakParent;
159
- /** @see [ifBreak](https://github.com/prettier/prettier/blob/main/commands.md#ifbreak) */
160
- function ifBreak(ifBreak: Doc, noBreak?: Doc, options?: {
161
- groupId?: symbol | undefined;
162
- }): IfBreak;
163
- /** @see [indent](https://github.com/prettier/prettier/blob/main/commands.md#indent) */
164
- function indent(doc: Doc): Indent;
165
- /** @see [indentIfBreak](https://github.com/prettier/prettier/blob/main/commands.md#indentifbreak) */
166
- function indentIfBreak(doc: Doc, opts: {
167
- groupId: symbol;
168
- negate?: boolean | undefined;
169
- }): IndentIfBreak;
170
- /** @see [join](https://github.com/prettier/prettier/blob/main/commands.md#join) */
171
- function join(sep: Doc, docs: Doc[]): Doc[];
172
- /** @see [label](https://github.com/prettier/prettier/blob/main/commands.md#label) */
173
- function label(label: any | undefined, contents: Doc): Doc;
174
- /** @see [line](https://github.com/prettier/prettier/blob/main/commands.md#line) */
175
- const line: Line;
176
- /** @see [lineSuffix](https://github.com/prettier/prettier/blob/main/commands.md#linesuffix) */
177
- function lineSuffix(suffix: Doc): LineSuffix;
178
- /** @see [lineSuffixBoundary](https://github.com/prettier/prettier/blob/main/commands.md#linesuffixboundary) */
179
- const lineSuffixBoundary: LineSuffixBoundary;
180
- /** @see [literalline](https://github.com/prettier/prettier/blob/main/commands.md#literalline) */
181
- const literalline: LiteralLine;
182
- /** @see [literallineWithoutBreakParent](https://github.com/prettier/prettier/blob/main/commands.md#hardlinewithoutbreakparent-and-literallinewithoutbreakparent) */
183
- const literallineWithoutBreakParent: LiterallineWithoutBreakParent;
184
- /** @see [markAsRoot](https://github.com/prettier/prettier/blob/main/commands.md#markasroot) */
185
- function markAsRoot(doc: Doc): Align;
186
- /** @see [softline](https://github.com/prettier/prettier/blob/main/commands.md#softline) */
187
- const softline: Softline;
188
- /** @see [trim](https://github.com/prettier/prettier/blob/main/commands.md#trim) */
189
- const trim: Trim;
190
- /** @see [cursor](https://github.com/prettier/prettier/blob/main/commands.md#cursor) */
191
- const cursor: Cursor;
192
- }
193
- declare namespace printer {
194
- function printDocToString(doc: builders.Doc, options: Options): {
195
- formatted: string;
196
- /**
197
- * This property is a misnomer, and has been since the changes in
198
- * https://github.com/prettier/prettier/pull/15709.
199
- * The region of the document indicated by `cursorNodeStart` and `cursorNodeText` will
200
- * sometimes actually be what lies BETWEEN a pair of leaf nodes in the AST, rather than a node.
201
- */
202
- cursorNodeStart?: number | undefined;
203
- /**
204
- * Note that, like cursorNodeStart, this is a misnomer and may actually be the text between two
205
- * leaf nodes in the AST instead of the text of a node.
206
- */
207
- cursorNodeText?: string | undefined;
208
- };
209
- interface Options {
210
- /**
211
- * Specify the line length that the printer will wrap on.
212
- * @default 80
213
- */
214
- printWidth: number;
215
- /**
216
- * Specify the number of spaces per indentation-level.
217
- * @default 2
218
- */
219
- tabWidth: number;
220
- /**
221
- * Indent lines with tabs instead of spaces
222
- * @default false
223
- */
224
- useTabs?: boolean;
225
- parentParser?: string | undefined;
226
- __embeddedInHtml?: boolean | undefined;
227
- }
228
- }
229
- declare namespace utils {
230
- function willBreak(doc: builders.Doc): boolean;
231
- function traverseDoc(doc: builders.Doc, onEnter?: (doc: builders.Doc) => void | boolean, onExit?: (doc: builders.Doc) => void, shouldTraverseConditionalGroups?: boolean): void;
232
- function findInDoc<T = builders.Doc>(doc: builders.Doc, callback: (doc: builders.Doc) => T, defaultValue: T): T;
233
- function mapDoc<T = builders.Doc>(doc: builders.Doc, callback: (doc: builders.Doc) => T): T;
234
- function removeLines(doc: builders.Doc): builders.Doc;
235
- function stripTrailingHardline(doc: builders.Doc): builders.Doc;
236
- function replaceEndOfLine(doc: builders.Doc, replacement?: builders.Doc): builders.Doc;
237
- function canBreak(doc: builders.Doc): boolean;
238
- }
239
- //#endregion
240
- //#region node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/index.d.ts
241
- declare namespace doc {
242
- export { builders, printer, utils };
243
- }
244
- // This utility is here to handle the case where you have an explicit union
245
- // between string literals and the generic string type. It would normally
246
- // resolve out to just the string type, but this generic LiteralUnion maintains
247
- // the intellisense of the original union.
248
- //
249
- // It comes from this issue: microsoft/TypeScript#29729:
250
- // https://github.com/microsoft/TypeScript/issues/29729#issuecomment-700527227
251
- type LiteralUnion<T extends U, U = string> = T | (Pick<U, never> & {
252
- _?: never | undefined;
253
- });
254
- type Doc$1 = doc.builders.Doc;
255
- // The type of elements that make up the given array T.
256
- type ArrayElement<T> = T extends Array<infer E> ? E : never; // A union of the properties of the given object that are arrays.
257
- type ArrayProperties<T> = { [K in keyof T]: NonNullable<T[K]> extends readonly any[] ? K : never }[keyof T]; // A union of the properties of the given array T that can be used to index it.
258
- // If the array is a tuple, then that's going to be the explicit indices of the
259
- // array, otherwise it's going to just be number.
260
- type IndexProperties<T extends {
261
- length: number;
262
- }> = IsTuple<T> extends true ? Exclude<Partial<T>["length"], T["length"]> : number; // Effectively performing T[P], except that it's telling TypeScript that it's
263
- // safe to do this for tuples, arrays, or objects.
264
- type IndexValue<T, P> = T extends any[] ? P extends number ? T[P] : never : P extends keyof T ? T[P] : never; // Determines if an object T is an array like string[] (in which case this
265
- // evaluates to false) or a tuple like [string] (in which case this evaluates to
266
- // true).
267
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
268
- type IsTuple<T> = T extends [] ? true : T extends [infer First, ...infer Remain] ? IsTuple<Remain> : false;
269
- type CallProperties<T> = T extends any[] ? IndexProperties<T> : keyof T;
270
- type IterProperties<T> = T extends any[] ? IndexProperties<T> : ArrayProperties<T>;
271
- type CallCallback<T, U> = (path: AstPath<T>, index: number, value: any) => U;
272
- type EachCallback<T> = (path: AstPath<ArrayElement<T>>, index: number, value: any) => void;
273
- type MapCallback<T, U> = (path: AstPath<ArrayElement<T>>, index: number, value: any) => U; // https://github.com/prettier/prettier/blob/next/src/common/ast-path.js
274
- declare class AstPath<T = any> {
275
- constructor(value: T);
276
- get key(): string | null;
277
- get index(): number | null;
278
- get node(): T;
279
- get parent(): T | null;
280
- get grandparent(): T | null;
281
- get isInArray(): boolean;
282
- get siblings(): T[] | null;
283
- get next(): T | null;
284
- get previous(): T | null;
285
- get isFirst(): boolean;
286
- get isLast(): boolean;
287
- get isRoot(): boolean;
288
- get root(): T;
289
- get ancestors(): T[];
290
- stack: T[];
291
- callParent<U>(callback: (path: this) => U, count?: number): U;
292
- /**
293
- * @deprecated Please use `AstPath#key` or `AstPath#index`
294
- */
295
- getName(): PropertyKey | null;
296
- /**
297
- * @deprecated Please use `AstPath#node` or `AstPath#siblings`
298
- */
299
- getValue(): T;
300
- getNode(count?: number): T | null;
301
- getParentNode(count?: number): T | null;
302
- match(...predicates: Array<(node: any, name: string | null, number: number | null) => boolean>): boolean; // For each of the tree walk functions (call, each, and map) this provides 5
303
- // strict type signatures, along with a fallback at the end if you end up
304
- // calling more than 5 properties deep. This helps a lot with typing because
305
- // for the majority of cases you're calling fewer than 5 properties, so the
306
- // tree walk functions have a clearer understanding of what you're doing.
307
- //
308
- // Note that resolving these types is somewhat complicated, and it wasn't
309
- // even supported until TypeScript 4.2 (before it would just say that the
310
- // type instantiation was excessively deep and possibly infinite).
311
- call<U>(callback: CallCallback<T, U>): U;
312
- call<U, P1 extends CallProperties<T>>(callback: CallCallback<IndexValue<T, P1>, U>, prop1: P1): U;
313
- call<U, P1 extends keyof T, P2 extends CallProperties<T[P1]>>(callback: CallCallback<IndexValue<IndexValue<T, P1>, P2>, U>, prop1: P1, prop2: P2): U;
314
- call<U, P1 extends keyof T, P2 extends CallProperties<T[P1]>, P3 extends CallProperties<IndexValue<T[P1], P2>>>(callback: CallCallback<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, U>, prop1: P1, prop2: P2, prop3: P3): U;
315
- call<U, P1 extends keyof T, P2 extends CallProperties<T[P1]>, P3 extends CallProperties<IndexValue<T[P1], P2>>, P4 extends CallProperties<IndexValue<IndexValue<T[P1], P2>, P3>>>(callback: CallCallback<IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>, U>, prop1: P1, prop2: P2, prop3: P3, prop4: P4): U;
316
- call<U, P extends PropertyKey>(callback: CallCallback<any, U>, prop1: P, prop2: P, prop3: P, prop4: P, ...props: P[]): U;
317
- each(callback: EachCallback<T>): void;
318
- each<P1 extends IterProperties<T>>(callback: EachCallback<IndexValue<T, P1>>, prop1: P1): void;
319
- each<P1 extends keyof T, P2 extends IterProperties<T[P1]>>(callback: EachCallback<IndexValue<IndexValue<T, P1>, P2>>, prop1: P1, prop2: P2): void;
320
- each<P1 extends keyof T, P2 extends IterProperties<T[P1]>, P3 extends IterProperties<IndexValue<T[P1], P2>>>(callback: EachCallback<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>>, prop1: P1, prop2: P2, prop3: P3): void;
321
- each<P1 extends keyof T, P2 extends IterProperties<T[P1]>, P3 extends IterProperties<IndexValue<T[P1], P2>>, P4 extends IterProperties<IndexValue<IndexValue<T[P1], P2>, P3>>>(callback: EachCallback<IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>>, prop1: P1, prop2: P2, prop3: P3, prop4: P4): void;
322
- each(callback: EachCallback<any[]>, prop1: PropertyKey, prop2: PropertyKey, prop3: PropertyKey, prop4: PropertyKey, ...props: PropertyKey[]): void;
323
- map<U>(callback: MapCallback<T, U>): U[];
324
- map<U, P1 extends IterProperties<T>>(callback: MapCallback<IndexValue<T, P1>, U>, prop1: P1): U[];
325
- map<U, P1 extends keyof T, P2 extends IterProperties<T[P1]>>(callback: MapCallback<IndexValue<IndexValue<T, P1>, P2>, U>, prop1: P1, prop2: P2): U[];
326
- map<U, P1 extends keyof T, P2 extends IterProperties<T[P1]>, P3 extends IterProperties<IndexValue<T[P1], P2>>>(callback: MapCallback<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, U>, prop1: P1, prop2: P2, prop3: P3): U[];
327
- map<U, P1 extends keyof T, P2 extends IterProperties<T[P1]>, P3 extends IterProperties<IndexValue<T[P1], P2>>, P4 extends IterProperties<IndexValue<IndexValue<T[P1], P2>, P3>>>(callback: MapCallback<IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>, U>, prop1: P1, prop2: P2, prop3: P3, prop4: P4): U[];
328
- map<U>(callback: MapCallback<any[], U>, prop1: PropertyKey, prop2: PropertyKey, prop3: PropertyKey, prop4: PropertyKey, ...props: PropertyKey[]): U[];
329
- }
330
- type BuiltInParserName = "acorn" | "angular" | "babel-flow" | "babel-ts" | "babel" | "css" | "espree" | "flow" | "glimmer" | "graphql" | "html" | "json-stringify" | "json" | "json5" | "jsonc" | "less" | "lwc" | "markdown" | "mdx" | "meriyah" | "mjml" | "scss" | "typescript" | "vue" | "yaml";
331
- /**
332
- * For use in `.prettierrc.js`, `.prettierrc.ts`, `.prettierrc.cjs`, `.prettierrc.cts`, `prettierrc.mjs`, `prettierrc.mts`, `prettier.config.js`, `prettier.config.ts`, `prettier.config.cjs`, `prettier.config.cts`, `prettier.config.mjs`, `prettier.config.mts`
333
- */
334
- interface Config extends Options$1 {
335
- overrides?: Array<{
336
- files: string | string[];
337
- excludeFiles?: string | string[];
338
- options?: Options$1;
339
- }>;
340
- }
341
- interface Options$1 extends Partial<RequiredOptions> {}
342
- interface RequiredOptions extends doc.printer.Options {
343
- /**
344
- * Print semicolons at the ends of statements.
345
- * @default true
346
- */
347
- semi: boolean;
348
- /**
349
- * Use single quotes instead of double quotes.
350
- * @default false
351
- */
352
- singleQuote: boolean;
353
- /**
354
- * Use single quotes in JSX.
355
- * @default false
356
- */
357
- jsxSingleQuote: boolean;
358
- /**
359
- * Print trailing commas wherever possible.
360
- * @default "all"
361
- */
362
- trailingComma: "none" | "es5" | "all";
363
- /**
364
- * Print spaces between brackets in object literals.
365
- * @default true
366
- */
367
- bracketSpacing: boolean;
368
- /**
369
- * How to wrap object literals.
370
- * @default "preserve"
371
- */
372
- objectWrap: "preserve" | "collapse";
373
- /**
374
- * Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being
375
- * alone on the next line (does not apply to self closing elements).
376
- * @default false
377
- */
378
- bracketSameLine: boolean;
379
- /**
380
- * Format only a segment of a file.
381
- * @default 0
382
- */
383
- rangeStart: number;
384
- /**
385
- * Format only a segment of a file.
386
- * @default Number.POSITIVE_INFINITY
387
- */
388
- rangeEnd: number;
389
- /**
390
- * Specify which parser to use.
391
- */
392
- parser: LiteralUnion<BuiltInParserName>;
393
- /**
394
- * Specify the input filepath. This will be used to do parser inference.
395
- */
396
- filepath: string;
397
- /**
398
- * Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
399
- * This is very useful when gradually transitioning large, unformatted codebases to prettier.
400
- * @default false
401
- */
402
- requirePragma: boolean;
403
- /**
404
- * Prettier can insert a special @format marker at the top of files specifying that
405
- * the file has been formatted with prettier. This works well when used in tandem with
406
- * the --require-pragma option. If there is already a docblock at the top of
407
- * the file then this option will add a newline to it with the @format marker.
408
- * @default false
409
- */
410
- insertPragma: boolean;
411
- /**
412
- * Prettier can allow individual files to opt out of formatting if they contain a special comment, called a pragma, at the top of the file.
413
- * @default false
414
- */
415
- checkIgnorePragma: boolean;
416
- /**
417
- * By default, Prettier will wrap markdown text as-is since some services use a linebreak-sensitive renderer.
418
- * In some cases you may want to rely on editor/viewer soft wrapping instead, so this option allows you to opt out.
419
- * @default "preserve"
420
- */
421
- proseWrap: "always" | "never" | "preserve";
422
- /**
423
- * Include parentheses around a sole arrow function parameter.
424
- * @default "always"
425
- */
426
- arrowParens: "avoid" | "always";
427
- /**
428
- * Provide ability to support new languages to prettier.
429
- */
430
- plugins: Array<string | URL | Plugin>;
431
- /**
432
- * How to handle whitespaces in HTML.
433
- * @default "css"
434
- */
435
- htmlWhitespaceSensitivity: "css" | "strict" | "ignore";
436
- /**
437
- * Which end of line characters to apply.
438
- * @default "lf"
439
- */
440
- endOfLine: "auto" | "lf" | "crlf" | "cr";
441
- /**
442
- * Change when properties in objects are quoted.
443
- * @default "as-needed"
444
- */
445
- quoteProps: "as-needed" | "consistent" | "preserve";
446
- /**
447
- * Whether or not to indent the code inside <script> and <style> tags in Vue files.
448
- * @default false
449
- */
450
- vueIndentScriptAndStyle: boolean;
451
- /**
452
- * Control whether Prettier formats quoted code embedded in the file.
453
- * @default "auto"
454
- */
455
- embeddedLanguageFormatting: "auto" | "off";
456
- /**
457
- * Enforce single attribute per line in HTML, Vue and JSX.
458
- * @default false
459
- */
460
- singleAttributePerLine: boolean;
461
- /**
462
- * Where to print operators when binary expressions wrap lines.
463
- * @default "end"
464
- */
465
- experimentalOperatorPosition: "start" | "end";
466
- /**
467
- * Use curious ternaries, with the question mark after the condition, instead
468
- * of on the same line as the consequent.
469
- * @default false
470
- */
471
- experimentalTernaries: boolean;
472
- /**
473
- * Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line.
474
- * @default false
475
- * @deprecated use bracketSameLine instead
476
- */
477
- jsxBracketSameLine?: boolean;
478
- /**
479
- * Arbitrary additional values on an options object are always allowed.
480
- */
481
- [_: string]: unknown;
482
- }
483
- interface ParserOptions<T = any> extends RequiredOptions {
484
- locStart: (node: T) => number;
485
- locEnd: (node: T) => number;
486
- originalText: string;
487
- }
488
- interface Plugin<T = any> {
489
- languages?: SupportLanguage[] | undefined;
490
- parsers?: {
491
- [parserName: string]: Parser<T>;
492
- } | undefined;
493
- printers?: {
494
- [astFormat: string]: Printer<T>;
495
- } | undefined;
496
- options?: SupportOptions | undefined;
497
- defaultOptions?: Partial<RequiredOptions> | undefined;
498
- }
499
- interface Parser<T = any> {
500
- parse: (text: string, options: ParserOptions<T>) => T | Promise<T>;
501
- astFormat: string;
502
- hasPragma?: ((text: string) => boolean) | undefined;
503
- hasIgnorePragma?: ((text: string) => boolean) | undefined;
504
- locStart: (node: T) => number;
505
- locEnd: (node: T) => number;
506
- preprocess?: ((text: string, options: ParserOptions<T>) => string | Promise<string>) | undefined;
507
- }
508
- interface Printer<T = any> {
509
- print(path: AstPath<T>, options: ParserOptions<T>, print: (path: AstPath<T>) => Doc$1, args?: unknown): Doc$1;
510
- printPrettierIgnored?(path: AstPath<T>, options: ParserOptions<T>, print: (path: AstPath<T>) => Doc$1, args?: unknown): Doc$1;
511
- embed?: ((path: AstPath, options: Options$1) => ((textToDoc: (text: string, options: Options$1) => Promise<Doc$1>, print: (selector?: string | number | Array<string | number> | AstPath) => Doc$1, path: AstPath, options: Options$1) => Promise<Doc$1 | undefined> | Doc$1 | undefined) | Doc$1 | null) | undefined;
512
- preprocess?: ((ast: T, options: ParserOptions<T>) => T | Promise<T>) | undefined;
513
- insertPragma?: (text: string) => string;
514
- /**
515
- * @returns `null` if you want to remove this node
516
- * @returns `void` if you want to use modified `cloned`
517
- * @returns anything if you want to replace the node with it
518
- */
519
- massageAstNode?: ((original: any, cloned: any, parent: any) => any) | undefined;
520
- hasPrettierIgnore?: ((path: AstPath<T>) => boolean) | undefined;
521
- canAttachComment?: ((node: T, ancestors: T[]) => boolean) | undefined;
522
- isBlockComment?: ((node: T) => boolean) | undefined;
523
- willPrintOwnComments?: ((path: AstPath<T>) => boolean) | undefined;
524
- printComment?: ((commentPath: AstPath<T>, options: ParserOptions<T>) => Doc$1) | undefined;
525
- /**
526
- * By default, Prettier searches all object properties (except for a few predefined ones) of each node recursively.
527
- * This function can be provided to override that behavior.
528
- * @param node The node whose children should be returned.
529
- * @param options Current options.
530
- * @returns `[]` if the node has no children or `undefined` to fall back on the default behavior.
531
- */
532
- getCommentChildNodes?: ((node: T, options: ParserOptions<T>) => T[] | undefined) | undefined;
533
- handleComments?: {
534
- ownLine?: ((commentNode: any, text: string, options: ParserOptions<T>, ast: T, isLastComment: boolean) => boolean) | undefined;
535
- endOfLine?: ((commentNode: any, text: string, options: ParserOptions<T>, ast: T, isLastComment: boolean) => boolean) | undefined;
536
- remaining?: ((commentNode: any, text: string, options: ParserOptions<T>, ast: T, isLastComment: boolean) => boolean) | undefined;
537
- } | undefined;
538
- getVisitorKeys?: ((node: T, nonTraversableKeys: Set<string>) => string[]) | undefined;
539
- }
540
- interface SupportLanguage {
541
- name: string;
542
- parsers: BuiltInParserName[] | string[];
543
- group?: string | undefined;
544
- tmScope?: string | undefined;
545
- aceMode?: string | undefined;
546
- codemirrorMode?: string | undefined;
547
- codemirrorMimeType?: string | undefined;
548
- aliases?: string[] | undefined;
549
- extensions?: string[] | undefined;
550
- filenames?: string[] | undefined;
551
- linguistLanguageId?: number | undefined;
552
- vscodeLanguageIds?: string[] | undefined;
553
- interpreters?: string[] | undefined;
554
- isSupported?: ((options: {
555
- filepath: string;
556
- }) => boolean) | undefined;
557
- }
558
- interface SupportOptionRange {
559
- start: number;
560
- end: number;
561
- step: number;
562
- }
563
- type SupportOptionType = "int" | "string" | "boolean" | "choice" | "path";
564
- interface BaseSupportOption<Type extends SupportOptionType> {
565
- readonly name?: string | undefined;
566
- /**
567
- * Usually you can use {@link CoreCategoryType}
568
- */
569
- category: string;
570
- /**
571
- * The type of the option.
572
- *
573
- * When passing a type other than the ones listed below, the option is
574
- * treated as taking any string as argument, and `--option <${type}>` will
575
- * be displayed in --help.
576
- */
577
- type: Type;
578
- /**
579
- * Indicate that the option is deprecated.
580
- *
581
- * Use a string to add an extra message to --help for the option,
582
- * for example to suggest a replacement option.
583
- */
584
- deprecated?: true | string | undefined;
585
- /**
586
- * Description to be displayed in --help. If omitted, the option won't be
587
- * shown at all in --help.
588
- */
589
- description?: string | undefined;
590
- }
591
- interface IntSupportOption extends BaseSupportOption<"int"> {
592
- default?: number | undefined;
593
- array?: false | undefined;
594
- range?: SupportOptionRange | undefined;
595
- }
596
- interface IntArraySupportOption extends BaseSupportOption<"int"> {
597
- default?: Array<{
598
- value: number[];
599
- }> | undefined;
600
- array: true;
601
- }
602
- interface StringSupportOption extends BaseSupportOption<"string"> {
603
- default?: string | undefined;
604
- array?: false | undefined;
605
- }
606
- interface StringArraySupportOption extends BaseSupportOption<"string"> {
607
- default?: Array<{
608
- value: string[];
609
- }> | undefined;
610
- array: true;
611
- }
612
- interface BooleanSupportOption extends BaseSupportOption<"boolean"> {
613
- default?: boolean | undefined;
614
- array?: false | undefined;
615
- description: string;
616
- oppositeDescription?: string | undefined;
617
- }
618
- interface BooleanArraySupportOption extends BaseSupportOption<"boolean"> {
619
- default?: Array<{
620
- value: boolean[];
621
- }> | undefined;
622
- array: true;
623
- }
624
- interface ChoiceSupportOption<Value = any> extends BaseSupportOption<"choice"> {
625
- default?: Value | Array<{
626
- value: Value;
627
- }> | undefined;
628
- description: string;
629
- choices: Array<{
630
- value: Value;
631
- description: string;
632
- }>;
633
- }
634
- interface PathSupportOption extends BaseSupportOption<"path"> {
635
- default?: string | undefined;
636
- array?: false | undefined;
637
- }
638
- interface PathArraySupportOption extends BaseSupportOption<"path"> {
639
- default?: Array<{
640
- value: string[];
641
- }> | undefined;
642
- array: true;
643
- }
644
- type SupportOption = IntSupportOption | IntArraySupportOption | StringSupportOption | StringArraySupportOption | BooleanSupportOption | BooleanArraySupportOption | ChoiceSupportOption | PathSupportOption | PathArraySupportOption;
645
- interface SupportOptions extends Record<string, SupportOption> {}
646
- //#endregion
647
62
  //#region src/configs/external/prettierConfig.d.ts
648
63
  declare const prettierConfig: Config;
649
64
  //#endregion
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { TSESTree } from "@typescript-eslint/utils";
2
2
  import z from "zod";
3
3
  import { Linter } from "eslint";
4
+ import { Config } from "prettier";
4
5
  import { TypeDocOptions } from "typedoc";
5
6
  import { PluginOptions } from "typedoc-plugin-markdown";
6
7
  import * as vite from "vite";
@@ -58,592 +59,6 @@ interface AlexPlugin {
58
59
  }
59
60
  declare const alexPlugin: AlexPlugin;
60
61
  //#endregion
61
- //#region node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/doc.d.ts
62
- // https://github.com/prettier/prettier/blob/next/src/document/public.js
63
- declare namespace builders {
64
- type DocCommand = Align | BreakParent | Cursor | Fill | Group | IfBreak | Indent | IndentIfBreak | Label | Line | LineSuffix | LineSuffixBoundary | Trim;
65
- type Doc = string | Doc[] | DocCommand;
66
- interface Align {
67
- type: "align";
68
- contents: Doc;
69
- n: number | string | {
70
- type: "root";
71
- };
72
- }
73
- interface BreakParent {
74
- type: "break-parent";
75
- }
76
- interface Cursor {
77
- type: "cursor";
78
- placeholder: symbol;
79
- }
80
- interface Fill {
81
- type: "fill";
82
- parts: Doc[];
83
- }
84
- interface Group {
85
- type: "group";
86
- id?: symbol;
87
- contents: Doc;
88
- break: boolean;
89
- expandedStates: Doc[];
90
- }
91
- interface HardlineWithoutBreakParent extends Line {
92
- hard: true;
93
- }
94
- interface IfBreak {
95
- type: "if-break";
96
- breakContents: Doc;
97
- flatContents: Doc;
98
- }
99
- interface Indent {
100
- type: "indent";
101
- contents: Doc;
102
- }
103
- interface IndentIfBreak {
104
- type: "indent-if-break";
105
- }
106
- interface Label {
107
- type: "label";
108
- label: any;
109
- contents: Doc;
110
- }
111
- interface Line {
112
- type: "line";
113
- soft?: boolean | undefined;
114
- hard?: boolean | undefined;
115
- literal?: boolean | undefined;
116
- }
117
- interface LineSuffix {
118
- type: "line-suffix";
119
- contents: Doc;
120
- }
121
- interface LineSuffixBoundary {
122
- type: "line-suffix-boundary";
123
- }
124
- interface LiterallineWithoutBreakParent extends Line {
125
- hard: true;
126
- literal: true;
127
- }
128
- type LiteralLine = [LiterallineWithoutBreakParent, BreakParent];
129
- interface Softline extends Line {
130
- soft: true;
131
- }
132
- type Hardline = [HardlineWithoutBreakParent, BreakParent];
133
- interface Trim {
134
- type: "trim";
135
- }
136
- interface GroupOptions {
137
- shouldBreak?: boolean | undefined;
138
- id?: symbol | undefined;
139
- }
140
- function addAlignmentToDoc(doc: Doc, size: number, tabWidth: number): Doc;
141
- /** @see [align](https://github.com/prettier/prettier/blob/main/commands.md#align) */
142
- function align(widthOrString: Align["n"], doc: Doc): Align;
143
- /** @see [breakParent](https://github.com/prettier/prettier/blob/main/commands.md#breakparent) */
144
- const breakParent: BreakParent;
145
- /** @see [conditionalGroup](https://github.com/prettier/prettier/blob/main/commands.md#conditionalgroup) */
146
- function conditionalGroup(alternatives: Doc[], options?: GroupOptions): Group;
147
- /** @see [dedent](https://github.com/prettier/prettier/blob/main/commands.md#dedent) */
148
- function dedent(doc: Doc): Align;
149
- /** @see [dedentToRoot](https://github.com/prettier/prettier/blob/main/commands.md#dedenttoroot) */
150
- function dedentToRoot(doc: Doc): Align;
151
- /** @see [fill](https://github.com/prettier/prettier/blob/main/commands.md#fill) */
152
- function fill(docs: Doc[]): Fill;
153
- /** @see [group](https://github.com/prettier/prettier/blob/main/commands.md#group) */
154
- function group(doc: Doc, opts?: GroupOptions): Group;
155
- /** @see [hardline](https://github.com/prettier/prettier/blob/main/commands.md#hardline) */
156
- const hardline: Hardline;
157
- /** @see [hardlineWithoutBreakParent](https://github.com/prettier/prettier/blob/main/commands.md#hardlinewithoutbreakparent-and-literallinewithoutbreakparent) */
158
- const hardlineWithoutBreakParent: HardlineWithoutBreakParent;
159
- /** @see [ifBreak](https://github.com/prettier/prettier/blob/main/commands.md#ifbreak) */
160
- function ifBreak(ifBreak: Doc, noBreak?: Doc, options?: {
161
- groupId?: symbol | undefined;
162
- }): IfBreak;
163
- /** @see [indent](https://github.com/prettier/prettier/blob/main/commands.md#indent) */
164
- function indent(doc: Doc): Indent;
165
- /** @see [indentIfBreak](https://github.com/prettier/prettier/blob/main/commands.md#indentifbreak) */
166
- function indentIfBreak(doc: Doc, opts: {
167
- groupId: symbol;
168
- negate?: boolean | undefined;
169
- }): IndentIfBreak;
170
- /** @see [join](https://github.com/prettier/prettier/blob/main/commands.md#join) */
171
- function join(sep: Doc, docs: Doc[]): Doc[];
172
- /** @see [label](https://github.com/prettier/prettier/blob/main/commands.md#label) */
173
- function label(label: any | undefined, contents: Doc): Doc;
174
- /** @see [line](https://github.com/prettier/prettier/blob/main/commands.md#line) */
175
- const line: Line;
176
- /** @see [lineSuffix](https://github.com/prettier/prettier/blob/main/commands.md#linesuffix) */
177
- function lineSuffix(suffix: Doc): LineSuffix;
178
- /** @see [lineSuffixBoundary](https://github.com/prettier/prettier/blob/main/commands.md#linesuffixboundary) */
179
- const lineSuffixBoundary: LineSuffixBoundary;
180
- /** @see [literalline](https://github.com/prettier/prettier/blob/main/commands.md#literalline) */
181
- const literalline: LiteralLine;
182
- /** @see [literallineWithoutBreakParent](https://github.com/prettier/prettier/blob/main/commands.md#hardlinewithoutbreakparent-and-literallinewithoutbreakparent) */
183
- const literallineWithoutBreakParent: LiterallineWithoutBreakParent;
184
- /** @see [markAsRoot](https://github.com/prettier/prettier/blob/main/commands.md#markasroot) */
185
- function markAsRoot(doc: Doc): Align;
186
- /** @see [softline](https://github.com/prettier/prettier/blob/main/commands.md#softline) */
187
- const softline: Softline;
188
- /** @see [trim](https://github.com/prettier/prettier/blob/main/commands.md#trim) */
189
- const trim: Trim;
190
- /** @see [cursor](https://github.com/prettier/prettier/blob/main/commands.md#cursor) */
191
- const cursor: Cursor;
192
- }
193
- declare namespace printer {
194
- function printDocToString(doc: builders.Doc, options: Options): {
195
- formatted: string;
196
- /**
197
- * This property is a misnomer, and has been since the changes in
198
- * https://github.com/prettier/prettier/pull/15709.
199
- * The region of the document indicated by `cursorNodeStart` and `cursorNodeText` will
200
- * sometimes actually be what lies BETWEEN a pair of leaf nodes in the AST, rather than a node.
201
- */
202
- cursorNodeStart?: number | undefined;
203
- /**
204
- * Note that, like cursorNodeStart, this is a misnomer and may actually be the text between two
205
- * leaf nodes in the AST instead of the text of a node.
206
- */
207
- cursorNodeText?: string | undefined;
208
- };
209
- interface Options {
210
- /**
211
- * Specify the line length that the printer will wrap on.
212
- * @default 80
213
- */
214
- printWidth: number;
215
- /**
216
- * Specify the number of spaces per indentation-level.
217
- * @default 2
218
- */
219
- tabWidth: number;
220
- /**
221
- * Indent lines with tabs instead of spaces
222
- * @default false
223
- */
224
- useTabs?: boolean;
225
- parentParser?: string | undefined;
226
- __embeddedInHtml?: boolean | undefined;
227
- }
228
- }
229
- declare namespace utils {
230
- function willBreak(doc: builders.Doc): boolean;
231
- function traverseDoc(doc: builders.Doc, onEnter?: (doc: builders.Doc) => void | boolean, onExit?: (doc: builders.Doc) => void, shouldTraverseConditionalGroups?: boolean): void;
232
- function findInDoc<T = builders.Doc>(doc: builders.Doc, callback: (doc: builders.Doc) => T, defaultValue: T): T;
233
- function mapDoc<T = builders.Doc>(doc: builders.Doc, callback: (doc: builders.Doc) => T): T;
234
- function removeLines(doc: builders.Doc): builders.Doc;
235
- function stripTrailingHardline(doc: builders.Doc): builders.Doc;
236
- function replaceEndOfLine(doc: builders.Doc, replacement?: builders.Doc): builders.Doc;
237
- function canBreak(doc: builders.Doc): boolean;
238
- }
239
- //#endregion
240
- //#region node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/index.d.ts
241
- declare namespace doc {
242
- export { builders, printer, utils };
243
- }
244
- // This utility is here to handle the case where you have an explicit union
245
- // between string literals and the generic string type. It would normally
246
- // resolve out to just the string type, but this generic LiteralUnion maintains
247
- // the intellisense of the original union.
248
- //
249
- // It comes from this issue: microsoft/TypeScript#29729:
250
- // https://github.com/microsoft/TypeScript/issues/29729#issuecomment-700527227
251
- type LiteralUnion<T extends U, U = string> = T | (Pick<U, never> & {
252
- _?: never | undefined;
253
- });
254
- type Doc$1 = doc.builders.Doc;
255
- // The type of elements that make up the given array T.
256
- type ArrayElement<T> = T extends Array<infer E> ? E : never; // A union of the properties of the given object that are arrays.
257
- type ArrayProperties<T> = { [K in keyof T]: NonNullable<T[K]> extends readonly any[] ? K : never }[keyof T]; // A union of the properties of the given array T that can be used to index it.
258
- // If the array is a tuple, then that's going to be the explicit indices of the
259
- // array, otherwise it's going to just be number.
260
- type IndexProperties<T extends {
261
- length: number;
262
- }> = IsTuple<T> extends true ? Exclude<Partial<T>["length"], T["length"]> : number; // Effectively performing T[P], except that it's telling TypeScript that it's
263
- // safe to do this for tuples, arrays, or objects.
264
- type IndexValue<T, P> = T extends any[] ? P extends number ? T[P] : never : P extends keyof T ? T[P] : never; // Determines if an object T is an array like string[] (in which case this
265
- // evaluates to false) or a tuple like [string] (in which case this evaluates to
266
- // true).
267
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
268
- type IsTuple<T> = T extends [] ? true : T extends [infer First, ...infer Remain] ? IsTuple<Remain> : false;
269
- type CallProperties<T> = T extends any[] ? IndexProperties<T> : keyof T;
270
- type IterProperties<T> = T extends any[] ? IndexProperties<T> : ArrayProperties<T>;
271
- type CallCallback<T, U> = (path: AstPath<T>, index: number, value: any) => U;
272
- type EachCallback<T> = (path: AstPath<ArrayElement<T>>, index: number, value: any) => void;
273
- type MapCallback<T, U> = (path: AstPath<ArrayElement<T>>, index: number, value: any) => U; // https://github.com/prettier/prettier/blob/next/src/common/ast-path.js
274
- declare class AstPath<T = any> {
275
- constructor(value: T);
276
- get key(): string | null;
277
- get index(): number | null;
278
- get node(): T;
279
- get parent(): T | null;
280
- get grandparent(): T | null;
281
- get isInArray(): boolean;
282
- get siblings(): T[] | null;
283
- get next(): T | null;
284
- get previous(): T | null;
285
- get isFirst(): boolean;
286
- get isLast(): boolean;
287
- get isRoot(): boolean;
288
- get root(): T;
289
- get ancestors(): T[];
290
- stack: T[];
291
- callParent<U>(callback: (path: this) => U, count?: number): U;
292
- /**
293
- * @deprecated Please use `AstPath#key` or `AstPath#index`
294
- */
295
- getName(): PropertyKey | null;
296
- /**
297
- * @deprecated Please use `AstPath#node` or `AstPath#siblings`
298
- */
299
- getValue(): T;
300
- getNode(count?: number): T | null;
301
- getParentNode(count?: number): T | null;
302
- match(...predicates: Array<(node: any, name: string | null, number: number | null) => boolean>): boolean; // For each of the tree walk functions (call, each, and map) this provides 5
303
- // strict type signatures, along with a fallback at the end if you end up
304
- // calling more than 5 properties deep. This helps a lot with typing because
305
- // for the majority of cases you're calling fewer than 5 properties, so the
306
- // tree walk functions have a clearer understanding of what you're doing.
307
- //
308
- // Note that resolving these types is somewhat complicated, and it wasn't
309
- // even supported until TypeScript 4.2 (before it would just say that the
310
- // type instantiation was excessively deep and possibly infinite).
311
- call<U>(callback: CallCallback<T, U>): U;
312
- call<U, P1 extends CallProperties<T>>(callback: CallCallback<IndexValue<T, P1>, U>, prop1: P1): U;
313
- call<U, P1 extends keyof T, P2 extends CallProperties<T[P1]>>(callback: CallCallback<IndexValue<IndexValue<T, P1>, P2>, U>, prop1: P1, prop2: P2): U;
314
- call<U, P1 extends keyof T, P2 extends CallProperties<T[P1]>, P3 extends CallProperties<IndexValue<T[P1], P2>>>(callback: CallCallback<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, U>, prop1: P1, prop2: P2, prop3: P3): U;
315
- call<U, P1 extends keyof T, P2 extends CallProperties<T[P1]>, P3 extends CallProperties<IndexValue<T[P1], P2>>, P4 extends CallProperties<IndexValue<IndexValue<T[P1], P2>, P3>>>(callback: CallCallback<IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>, U>, prop1: P1, prop2: P2, prop3: P3, prop4: P4): U;
316
- call<U, P extends PropertyKey>(callback: CallCallback<any, U>, prop1: P, prop2: P, prop3: P, prop4: P, ...props: P[]): U;
317
- each(callback: EachCallback<T>): void;
318
- each<P1 extends IterProperties<T>>(callback: EachCallback<IndexValue<T, P1>>, prop1: P1): void;
319
- each<P1 extends keyof T, P2 extends IterProperties<T[P1]>>(callback: EachCallback<IndexValue<IndexValue<T, P1>, P2>>, prop1: P1, prop2: P2): void;
320
- each<P1 extends keyof T, P2 extends IterProperties<T[P1]>, P3 extends IterProperties<IndexValue<T[P1], P2>>>(callback: EachCallback<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>>, prop1: P1, prop2: P2, prop3: P3): void;
321
- each<P1 extends keyof T, P2 extends IterProperties<T[P1]>, P3 extends IterProperties<IndexValue<T[P1], P2>>, P4 extends IterProperties<IndexValue<IndexValue<T[P1], P2>, P3>>>(callback: EachCallback<IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>>, prop1: P1, prop2: P2, prop3: P3, prop4: P4): void;
322
- each(callback: EachCallback<any[]>, prop1: PropertyKey, prop2: PropertyKey, prop3: PropertyKey, prop4: PropertyKey, ...props: PropertyKey[]): void;
323
- map<U>(callback: MapCallback<T, U>): U[];
324
- map<U, P1 extends IterProperties<T>>(callback: MapCallback<IndexValue<T, P1>, U>, prop1: P1): U[];
325
- map<U, P1 extends keyof T, P2 extends IterProperties<T[P1]>>(callback: MapCallback<IndexValue<IndexValue<T, P1>, P2>, U>, prop1: P1, prop2: P2): U[];
326
- map<U, P1 extends keyof T, P2 extends IterProperties<T[P1]>, P3 extends IterProperties<IndexValue<T[P1], P2>>>(callback: MapCallback<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, U>, prop1: P1, prop2: P2, prop3: P3): U[];
327
- map<U, P1 extends keyof T, P2 extends IterProperties<T[P1]>, P3 extends IterProperties<IndexValue<T[P1], P2>>, P4 extends IterProperties<IndexValue<IndexValue<T[P1], P2>, P3>>>(callback: MapCallback<IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>, U>, prop1: P1, prop2: P2, prop3: P3, prop4: P4): U[];
328
- map<U>(callback: MapCallback<any[], U>, prop1: PropertyKey, prop2: PropertyKey, prop3: PropertyKey, prop4: PropertyKey, ...props: PropertyKey[]): U[];
329
- }
330
- type BuiltInParserName = "acorn" | "angular" | "babel-flow" | "babel-ts" | "babel" | "css" | "espree" | "flow" | "glimmer" | "graphql" | "html" | "json-stringify" | "json" | "json5" | "jsonc" | "less" | "lwc" | "markdown" | "mdx" | "meriyah" | "mjml" | "scss" | "typescript" | "vue" | "yaml";
331
- /**
332
- * For use in `.prettierrc.js`, `.prettierrc.ts`, `.prettierrc.cjs`, `.prettierrc.cts`, `prettierrc.mjs`, `prettierrc.mts`, `prettier.config.js`, `prettier.config.ts`, `prettier.config.cjs`, `prettier.config.cts`, `prettier.config.mjs`, `prettier.config.mts`
333
- */
334
- interface Config extends Options$1 {
335
- overrides?: Array<{
336
- files: string | string[];
337
- excludeFiles?: string | string[];
338
- options?: Options$1;
339
- }>;
340
- }
341
- interface Options$1 extends Partial<RequiredOptions> {}
342
- interface RequiredOptions extends doc.printer.Options {
343
- /**
344
- * Print semicolons at the ends of statements.
345
- * @default true
346
- */
347
- semi: boolean;
348
- /**
349
- * Use single quotes instead of double quotes.
350
- * @default false
351
- */
352
- singleQuote: boolean;
353
- /**
354
- * Use single quotes in JSX.
355
- * @default false
356
- */
357
- jsxSingleQuote: boolean;
358
- /**
359
- * Print trailing commas wherever possible.
360
- * @default "all"
361
- */
362
- trailingComma: "none" | "es5" | "all";
363
- /**
364
- * Print spaces between brackets in object literals.
365
- * @default true
366
- */
367
- bracketSpacing: boolean;
368
- /**
369
- * How to wrap object literals.
370
- * @default "preserve"
371
- */
372
- objectWrap: "preserve" | "collapse";
373
- /**
374
- * Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being
375
- * alone on the next line (does not apply to self closing elements).
376
- * @default false
377
- */
378
- bracketSameLine: boolean;
379
- /**
380
- * Format only a segment of a file.
381
- * @default 0
382
- */
383
- rangeStart: number;
384
- /**
385
- * Format only a segment of a file.
386
- * @default Number.POSITIVE_INFINITY
387
- */
388
- rangeEnd: number;
389
- /**
390
- * Specify which parser to use.
391
- */
392
- parser: LiteralUnion<BuiltInParserName>;
393
- /**
394
- * Specify the input filepath. This will be used to do parser inference.
395
- */
396
- filepath: string;
397
- /**
398
- * Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
399
- * This is very useful when gradually transitioning large, unformatted codebases to prettier.
400
- * @default false
401
- */
402
- requirePragma: boolean;
403
- /**
404
- * Prettier can insert a special @format marker at the top of files specifying that
405
- * the file has been formatted with prettier. This works well when used in tandem with
406
- * the --require-pragma option. If there is already a docblock at the top of
407
- * the file then this option will add a newline to it with the @format marker.
408
- * @default false
409
- */
410
- insertPragma: boolean;
411
- /**
412
- * Prettier can allow individual files to opt out of formatting if they contain a special comment, called a pragma, at the top of the file.
413
- * @default false
414
- */
415
- checkIgnorePragma: boolean;
416
- /**
417
- * By default, Prettier will wrap markdown text as-is since some services use a linebreak-sensitive renderer.
418
- * In some cases you may want to rely on editor/viewer soft wrapping instead, so this option allows you to opt out.
419
- * @default "preserve"
420
- */
421
- proseWrap: "always" | "never" | "preserve";
422
- /**
423
- * Include parentheses around a sole arrow function parameter.
424
- * @default "always"
425
- */
426
- arrowParens: "avoid" | "always";
427
- /**
428
- * Provide ability to support new languages to prettier.
429
- */
430
- plugins: Array<string | URL | Plugin>;
431
- /**
432
- * How to handle whitespaces in HTML.
433
- * @default "css"
434
- */
435
- htmlWhitespaceSensitivity: "css" | "strict" | "ignore";
436
- /**
437
- * Which end of line characters to apply.
438
- * @default "lf"
439
- */
440
- endOfLine: "auto" | "lf" | "crlf" | "cr";
441
- /**
442
- * Change when properties in objects are quoted.
443
- * @default "as-needed"
444
- */
445
- quoteProps: "as-needed" | "consistent" | "preserve";
446
- /**
447
- * Whether or not to indent the code inside <script> and <style> tags in Vue files.
448
- * @default false
449
- */
450
- vueIndentScriptAndStyle: boolean;
451
- /**
452
- * Control whether Prettier formats quoted code embedded in the file.
453
- * @default "auto"
454
- */
455
- embeddedLanguageFormatting: "auto" | "off";
456
- /**
457
- * Enforce single attribute per line in HTML, Vue and JSX.
458
- * @default false
459
- */
460
- singleAttributePerLine: boolean;
461
- /**
462
- * Where to print operators when binary expressions wrap lines.
463
- * @default "end"
464
- */
465
- experimentalOperatorPosition: "start" | "end";
466
- /**
467
- * Use curious ternaries, with the question mark after the condition, instead
468
- * of on the same line as the consequent.
469
- * @default false
470
- */
471
- experimentalTernaries: boolean;
472
- /**
473
- * Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line.
474
- * @default false
475
- * @deprecated use bracketSameLine instead
476
- */
477
- jsxBracketSameLine?: boolean;
478
- /**
479
- * Arbitrary additional values on an options object are always allowed.
480
- */
481
- [_: string]: unknown;
482
- }
483
- interface ParserOptions<T = any> extends RequiredOptions {
484
- locStart: (node: T) => number;
485
- locEnd: (node: T) => number;
486
- originalText: string;
487
- }
488
- interface Plugin<T = any> {
489
- languages?: SupportLanguage[] | undefined;
490
- parsers?: {
491
- [parserName: string]: Parser<T>;
492
- } | undefined;
493
- printers?: {
494
- [astFormat: string]: Printer<T>;
495
- } | undefined;
496
- options?: SupportOptions | undefined;
497
- defaultOptions?: Partial<RequiredOptions> | undefined;
498
- }
499
- interface Parser<T = any> {
500
- parse: (text: string, options: ParserOptions<T>) => T | Promise<T>;
501
- astFormat: string;
502
- hasPragma?: ((text: string) => boolean) | undefined;
503
- hasIgnorePragma?: ((text: string) => boolean) | undefined;
504
- locStart: (node: T) => number;
505
- locEnd: (node: T) => number;
506
- preprocess?: ((text: string, options: ParserOptions<T>) => string | Promise<string>) | undefined;
507
- }
508
- interface Printer<T = any> {
509
- print(path: AstPath<T>, options: ParserOptions<T>, print: (path: AstPath<T>) => Doc$1, args?: unknown): Doc$1;
510
- printPrettierIgnored?(path: AstPath<T>, options: ParserOptions<T>, print: (path: AstPath<T>) => Doc$1, args?: unknown): Doc$1;
511
- embed?: ((path: AstPath, options: Options$1) => ((textToDoc: (text: string, options: Options$1) => Promise<Doc$1>, print: (selector?: string | number | Array<string | number> | AstPath) => Doc$1, path: AstPath, options: Options$1) => Promise<Doc$1 | undefined> | Doc$1 | undefined) | Doc$1 | null) | undefined;
512
- preprocess?: ((ast: T, options: ParserOptions<T>) => T | Promise<T>) | undefined;
513
- insertPragma?: (text: string) => string;
514
- /**
515
- * @returns `null` if you want to remove this node
516
- * @returns `void` if you want to use modified `cloned`
517
- * @returns anything if you want to replace the node with it
518
- */
519
- massageAstNode?: ((original: any, cloned: any, parent: any) => any) | undefined;
520
- hasPrettierIgnore?: ((path: AstPath<T>) => boolean) | undefined;
521
- canAttachComment?: ((node: T, ancestors: T[]) => boolean) | undefined;
522
- isBlockComment?: ((node: T) => boolean) | undefined;
523
- willPrintOwnComments?: ((path: AstPath<T>) => boolean) | undefined;
524
- printComment?: ((commentPath: AstPath<T>, options: ParserOptions<T>) => Doc$1) | undefined;
525
- /**
526
- * By default, Prettier searches all object properties (except for a few predefined ones) of each node recursively.
527
- * This function can be provided to override that behavior.
528
- * @param node The node whose children should be returned.
529
- * @param options Current options.
530
- * @returns `[]` if the node has no children or `undefined` to fall back on the default behavior.
531
- */
532
- getCommentChildNodes?: ((node: T, options: ParserOptions<T>) => T[] | undefined) | undefined;
533
- handleComments?: {
534
- ownLine?: ((commentNode: any, text: string, options: ParserOptions<T>, ast: T, isLastComment: boolean) => boolean) | undefined;
535
- endOfLine?: ((commentNode: any, text: string, options: ParserOptions<T>, ast: T, isLastComment: boolean) => boolean) | undefined;
536
- remaining?: ((commentNode: any, text: string, options: ParserOptions<T>, ast: T, isLastComment: boolean) => boolean) | undefined;
537
- } | undefined;
538
- getVisitorKeys?: ((node: T, nonTraversableKeys: Set<string>) => string[]) | undefined;
539
- }
540
- interface SupportLanguage {
541
- name: string;
542
- parsers: BuiltInParserName[] | string[];
543
- group?: string | undefined;
544
- tmScope?: string | undefined;
545
- aceMode?: string | undefined;
546
- codemirrorMode?: string | undefined;
547
- codemirrorMimeType?: string | undefined;
548
- aliases?: string[] | undefined;
549
- extensions?: string[] | undefined;
550
- filenames?: string[] | undefined;
551
- linguistLanguageId?: number | undefined;
552
- vscodeLanguageIds?: string[] | undefined;
553
- interpreters?: string[] | undefined;
554
- isSupported?: ((options: {
555
- filepath: string;
556
- }) => boolean) | undefined;
557
- }
558
- interface SupportOptionRange {
559
- start: number;
560
- end: number;
561
- step: number;
562
- }
563
- type SupportOptionType = "int" | "string" | "boolean" | "choice" | "path";
564
- interface BaseSupportOption<Type extends SupportOptionType> {
565
- readonly name?: string | undefined;
566
- /**
567
- * Usually you can use {@link CoreCategoryType}
568
- */
569
- category: string;
570
- /**
571
- * The type of the option.
572
- *
573
- * When passing a type other than the ones listed below, the option is
574
- * treated as taking any string as argument, and `--option <${type}>` will
575
- * be displayed in --help.
576
- */
577
- type: Type;
578
- /**
579
- * Indicate that the option is deprecated.
580
- *
581
- * Use a string to add an extra message to --help for the option,
582
- * for example to suggest a replacement option.
583
- */
584
- deprecated?: true | string | undefined;
585
- /**
586
- * Description to be displayed in --help. If omitted, the option won't be
587
- * shown at all in --help.
588
- */
589
- description?: string | undefined;
590
- }
591
- interface IntSupportOption extends BaseSupportOption<"int"> {
592
- default?: number | undefined;
593
- array?: false | undefined;
594
- range?: SupportOptionRange | undefined;
595
- }
596
- interface IntArraySupportOption extends BaseSupportOption<"int"> {
597
- default?: Array<{
598
- value: number[];
599
- }> | undefined;
600
- array: true;
601
- }
602
- interface StringSupportOption extends BaseSupportOption<"string"> {
603
- default?: string | undefined;
604
- array?: false | undefined;
605
- }
606
- interface StringArraySupportOption extends BaseSupportOption<"string"> {
607
- default?: Array<{
608
- value: string[];
609
- }> | undefined;
610
- array: true;
611
- }
612
- interface BooleanSupportOption extends BaseSupportOption<"boolean"> {
613
- default?: boolean | undefined;
614
- array?: false | undefined;
615
- description: string;
616
- oppositeDescription?: string | undefined;
617
- }
618
- interface BooleanArraySupportOption extends BaseSupportOption<"boolean"> {
619
- default?: Array<{
620
- value: boolean[];
621
- }> | undefined;
622
- array: true;
623
- }
624
- interface ChoiceSupportOption<Value = any> extends BaseSupportOption<"choice"> {
625
- default?: Value | Array<{
626
- value: Value;
627
- }> | undefined;
628
- description: string;
629
- choices: Array<{
630
- value: Value;
631
- description: string;
632
- }>;
633
- }
634
- interface PathSupportOption extends BaseSupportOption<"path"> {
635
- default?: string | undefined;
636
- array?: false | undefined;
637
- }
638
- interface PathArraySupportOption extends BaseSupportOption<"path"> {
639
- default?: Array<{
640
- value: string[];
641
- }> | undefined;
642
- array: true;
643
- }
644
- type SupportOption = IntSupportOption | IntArraySupportOption | StringSupportOption | StringArraySupportOption | BooleanSupportOption | BooleanArraySupportOption | ChoiceSupportOption | PathSupportOption | PathArraySupportOption;
645
- interface SupportOptions extends Record<string, SupportOption> {}
646
- //#endregion
647
62
  //#region src/configs/external/prettierConfig.d.ts
648
63
  declare const prettierConfig: Config;
649
64
  //#endregion
package/dist/index.js CHANGED
@@ -5461,7 +5461,7 @@ var rules_default = {
5461
5461
  //#endregion
5462
5462
  //#region package.json
5463
5463
  var name = "@alextheman/eslint-plugin";
5464
- var version = "5.6.1";
5464
+ var version = "5.6.2";
5465
5465
 
5466
5466
  //#endregion
5467
5467
  //#region src/alexPlugin.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "5.6.1",
3
+ "version": "5.6.2",
4
4
  "description": "A package to provide custom ESLint rules and configs.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,6 +34,7 @@
34
34
  "@typescript-eslint/types": "^8.54.0",
35
35
  "@typescript-eslint/utils": "^8.54.0",
36
36
  "common-tags": "^1.8.2",
37
+ "prettier": "^3.8.1",
37
38
  "zod": "^4.3.6"
38
39
  },
39
40
  "devDependencies": {
@@ -62,7 +63,6 @@
62
63
  "globals": "^17.3.0",
63
64
  "husky": "^9.1.7",
64
65
  "jsdom": "^28.0.0",
65
- "prettier": "^3.8.1",
66
66
  "tsdown": "^0.20.3",
67
67
  "tsx": "^4.21.0",
68
68
  "typedoc": "^0.28.16",