@eienjs/eslint-config 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/cli/constants.js +74 -0
  2. package/dist/cli/constants_generated.js +13 -0
  3. package/dist/cli/index.d.ts +1 -1
  4. package/dist/cli/index.js +3 -268
  5. package/dist/cli/run.js +77 -0
  6. package/dist/cli/stages/update_eslint_files.js +41 -0
  7. package/dist/cli/stages/update_package_json.js +46 -0
  8. package/dist/cli/stages/update_vscode_settings.js +30 -0
  9. package/dist/cli/utils.js +23 -0
  10. package/dist/configs/adonisjs.d.ts +6 -0
  11. package/dist/configs/adonisjs.js +115 -0
  12. package/dist/configs/astro.d.ts +6 -0
  13. package/dist/configs/astro.js +52 -0
  14. package/dist/configs/command.d.ts +6 -0
  15. package/dist/configs/command.js +12 -0
  16. package/dist/configs/comments.d.ts +6 -0
  17. package/dist/configs/comments.js +19 -0
  18. package/dist/configs/disables.d.ts +6 -0
  19. package/dist/configs/disables.js +85 -0
  20. package/dist/configs/formatters.d.ts +6 -0
  21. package/dist/configs/formatters.js +134 -0
  22. package/dist/configs/ignores.d.ts +6 -0
  23. package/dist/configs/ignores.js +12 -0
  24. package/dist/configs/imports.d.ts +6 -0
  25. package/dist/configs/imports.js +28 -0
  26. package/dist/configs/index.d.ts +25 -95
  27. package/dist/configs/index.js +25 -1
  28. package/dist/configs/javascript.d.ts +6 -0
  29. package/dist/configs/javascript.js +289 -0
  30. package/dist/configs/jsdoc.d.ts +6 -0
  31. package/dist/configs/jsdoc.js +34 -0
  32. package/dist/configs/jsonc.d.ts +6 -0
  33. package/dist/configs/jsonc.js +71 -0
  34. package/dist/configs/markdown.d.ts +6 -0
  35. package/dist/configs/markdown.js +67 -0
  36. package/dist/configs/node.d.ts +6 -0
  37. package/dist/configs/node.js +22 -0
  38. package/dist/configs/nuxt.d.ts +6 -0
  39. package/dist/configs/nuxt.js +137 -0
  40. package/dist/configs/perfectionist.d.ts +12 -0
  41. package/dist/configs/perfectionist.js +56 -0
  42. package/dist/configs/pnpm.d.ts +6 -0
  43. package/dist/configs/pnpm.js +33 -0
  44. package/dist/configs/regexp.d.ts +6 -0
  45. package/dist/configs/regexp.js +21 -0
  46. package/dist/configs/sort.d.ts +18 -0
  47. package/dist/configs/sort.js +239 -0
  48. package/dist/configs/stylistic.d.ts +8 -0
  49. package/dist/configs/stylistic.js +76 -0
  50. package/dist/configs/test.d.ts +6 -0
  51. package/dist/configs/test.js +42 -0
  52. package/dist/configs/toml.d.ts +6 -0
  53. package/dist/configs/toml.js +45 -0
  54. package/dist/configs/typescript.d.ts +6 -0
  55. package/dist/configs/typescript.js +213 -0
  56. package/dist/configs/unicorn.d.ts +6 -0
  57. package/dist/configs/unicorn.js +42 -0
  58. package/dist/configs/vue.d.ts +6 -0
  59. package/dist/configs/vue.js +206 -0
  60. package/dist/configs/yaml.d.ts +6 -0
  61. package/dist/configs/yaml.js +83 -0
  62. package/dist/factory.d.ts +17 -0
  63. package/dist/factory.js +161 -0
  64. package/dist/globs.d.ts +32 -0
  65. package/dist/globs.js +89 -0
  66. package/dist/index.d.ts +5 -85
  67. package/dist/index.js +3 -133
  68. package/dist/package.js +5 -0
  69. package/dist/plugins.js +9 -0
  70. package/dist/{types-CThb4-OB.d.ts → typegen.d.ts} +353 -703
  71. package/dist/types.d.ts +404 -0
  72. package/dist/utils.d.ts +42 -0
  73. package/dist/utils.js +62 -0
  74. package/dist/vendored/prettier_types.d.ts +121 -0
  75. package/package.json +31 -24
  76. package/dist/configs-tpIJYMDE.js +0 -2189
@@ -0,0 +1,404 @@
1
+ import { ConfigNames, RuleOptions } from "./typegen.js";
2
+ import { VendoredPrettierOptions } from "./vendored/prettier_types.js";
3
+ import { StylisticCustomizeOptions } from "@stylistic/eslint-plugin";
4
+ import { ParserOptions } from "@typescript-eslint/parser";
5
+ import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
6
+ import { Options } from "eslint-processor-vue-blocks";
7
+ import { Linter } from "eslint";
8
+
9
+ //#region src/types.d.ts
10
+ type Awaitable<T> = T | Promise<T>;
11
+ type Rules = Record<string, Linter.RuleEntry | undefined> & RuleOptions;
12
+ /**
13
+ * An updated version of ESLint's `Linter.Config`, which provides autocompletion
14
+ * for `rules` and relaxes type limitations for `plugins` and `rules`, because
15
+ * many plugins still lack proper type definitions.
16
+ */
17
+ type TypedFlatConfigItem = Omit<Linter.Config, 'plugins' | 'rules'> & {
18
+ /**
19
+ * An object containing a name-value mapping of plugin names to plugin objects.
20
+ * When `files` is specified, these plugins are only available to the matching files.
21
+ *
22
+ * @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
23
+ */
24
+ plugins?: Record<string, unknown>;
25
+ /**
26
+ * An object containing the configured rules. When `files` or `ignores` are
27
+ * specified, these rule configurations are only available to the matching files.
28
+ */
29
+ rules?: Rules;
30
+ };
31
+ interface OptionsNuxt extends OptionsOverrides {
32
+ /**
33
+ * Version of Nuxt
34
+ *
35
+ * @default 4
36
+ */
37
+ version?: 3 | 4;
38
+ /**
39
+ * Sort keys in nuxt.config to maintain a consistent order
40
+ *
41
+ * @default true when `stylistic` is enabled
42
+ */
43
+ sortConfigKeys?: boolean;
44
+ dirs?: {
45
+ /**
46
+ * Nuxt source directory
47
+ */
48
+ src?: string[];
49
+ /**
50
+ * Root directory for nuxt project
51
+ */
52
+ root?: string[];
53
+ /**
54
+ * Directory for pages
55
+ */
56
+ pages?: string[];
57
+ /**
58
+ * Directory for layouts
59
+ */
60
+ layouts?: string[];
61
+ /**
62
+ * Directory for components
63
+ */
64
+ components?: string[];
65
+ /**
66
+ * Directory for components with prefix
67
+ * Ignore `vue/multi-word-component-names`
68
+ */
69
+ componentsPrefixed?: string[];
70
+ /**
71
+ * Directory for composobles
72
+ */
73
+ composables?: string[];
74
+ /**
75
+ * Directory for plugins
76
+ */
77
+ plugins?: string[];
78
+ /**
79
+ * Directory for modules
80
+ */
81
+ modules?: string[];
82
+ /**
83
+ * Directory for middleware
84
+ */
85
+ middleware?: string[];
86
+ /**
87
+ * Directory for server
88
+ */
89
+ servers?: string[];
90
+ /**
91
+ * Directory for utils
92
+ */
93
+ utils?: string[];
94
+ };
95
+ }
96
+ interface OptionsAdonisJS extends OptionsOverrides {
97
+ /**
98
+ * Override the `dirs` option to provide custom directories of adonisjs app.
99
+ */
100
+ dirs?: {
101
+ root?: string;
102
+ bin?: string;
103
+ controllers?: string;
104
+ exceptions?: string;
105
+ models?: string;
106
+ mails?: string;
107
+ services?: string;
108
+ listeners?: string;
109
+ events?: string;
110
+ middleware?: string;
111
+ validators?: string;
112
+ providers?: string;
113
+ policies?: string;
114
+ abilities?: string;
115
+ database?: string;
116
+ start?: string;
117
+ tests?: string;
118
+ config?: string;
119
+ commands?: string;
120
+ };
121
+ }
122
+ interface OptionsVue extends OptionsOverrides {
123
+ /**
124
+ * Create virtual files for Vue SFC blocks to enable linting.
125
+ *
126
+ * @see https://github.com/antfu/eslint-processor-vue-blocks
127
+ * @default true
128
+ */
129
+ sfcBlocks?: boolean | Options;
130
+ /**
131
+ * Only check registered components in template casing.
132
+ *
133
+ * @default false
134
+ */
135
+ componentNameInTemplateCasingOnlyRegistered?: boolean;
136
+ /**
137
+ * Ignored components in template casing.
138
+ *
139
+ * @default []
140
+ */
141
+ componentNameInTemplateCasingIgnores?: string[];
142
+ /**
143
+ * Global components in template casing.
144
+ *
145
+ * @default []
146
+ */
147
+ componentNameInTemplateCasingGlobals?: string[];
148
+ }
149
+ type OptionsTypescript = (OptionsTypeScriptWithTypes & OptionsOverrides) | (OptionsTypeScriptParserOptions & OptionsOverrides);
150
+ interface OptionsFormatters {
151
+ /**
152
+ * Enable formatting support for CSS, Less, Sass, and SCSS.
153
+ *
154
+ * Currently only support Prettier.
155
+ */
156
+ css?: 'prettier' | boolean;
157
+ /**
158
+ * Enable formatting support for HTML.
159
+ *
160
+ * Currently only support Prettier.
161
+ */
162
+ html?: 'prettier' | boolean;
163
+ /**
164
+ * Enable formatting support for XML.
165
+ *
166
+ * Currently only support Prettier.
167
+ */
168
+ xml?: 'prettier' | boolean;
169
+ /**
170
+ * Enable formatting support for SVG.
171
+ *
172
+ * Currently only support Prettier.
173
+ */
174
+ svg?: 'prettier' | boolean;
175
+ /**
176
+ * Enable formatting support for Markdown.
177
+ *
178
+ * Support both Prettier and dprint.
179
+ *
180
+ * When set to `true`, it will use Prettier.
181
+ */
182
+ markdown?: 'prettier' | boolean;
183
+ /**
184
+ * Custom options for Prettier.
185
+ *
186
+ * By default it's controlled by our own config.
187
+ */
188
+ prettierOptions?: VendoredPrettierOptions;
189
+ /**
190
+ * Enable formatting support for Astro.
191
+ *
192
+ * Currently only support Prettier.
193
+ */
194
+ astro?: 'prettier' | boolean;
195
+ }
196
+ interface OptionsComponentExts {
197
+ /**
198
+ * Additional extensions for components.
199
+ *
200
+ * @example ['vue']
201
+ * @default []
202
+ */
203
+ componentExts?: string[];
204
+ }
205
+ interface OptionsTypeScriptParserOptions {
206
+ /**
207
+ * Additional parser options for TypeScript.
208
+ */
209
+ parserOptions?: Partial<ParserOptions>;
210
+ /**
211
+ * Glob patterns for files that should be type aware.
212
+ * @default ['**\/*.{ts,tsx}']
213
+ */
214
+ filesTypeAware?: string[];
215
+ /**
216
+ * Glob patterns for files that should not be type aware.
217
+ * @default ['**\/*.md\/**', '**\/*.astro/*.ts']
218
+ */
219
+ ignoresTypeAware?: string[];
220
+ }
221
+ interface OptionsTypeScriptWithTypes {
222
+ /**
223
+ * When this options is provided, type aware rules will be enabled.
224
+ * @see https://typescript-eslint.io/linting/typed-linting/
225
+ */
226
+ tsconfigPath?: string;
227
+ /**
228
+ * Override type aware rules.
229
+ */
230
+ overridesTypeAware?: TypedFlatConfigItem['rules'];
231
+ }
232
+ interface OptionsHasTypeScript {
233
+ typescript?: boolean;
234
+ }
235
+ interface OptionsStylistic {
236
+ stylistic?: boolean | StylisticConfig;
237
+ }
238
+ interface StylisticConfig extends Pick<StylisticCustomizeOptions, 'indent' | 'quotes'> {
239
+ maxLineLength?: number;
240
+ }
241
+ interface OptionsOverrides {
242
+ overrides?: TypedFlatConfigItem['rules'];
243
+ }
244
+ interface OptionsFiles {
245
+ /**
246
+ * Override the `files` option to provide custom globs.
247
+ */
248
+ files?: string[];
249
+ }
250
+ interface OptionsRegExp {
251
+ /**
252
+ * Override rulelevels
253
+ */
254
+ level?: 'error' | 'warn';
255
+ }
256
+ interface OptionsIsInEditor {
257
+ isInEditor?: boolean;
258
+ }
259
+ interface OptionsConfig extends OptionsComponentExts {
260
+ /**
261
+ * Enable gitignore support.
262
+ *
263
+ * Passing an object to configure the options.
264
+ *
265
+ * @see https://github.com/antfu/eslint-config-flat-gitignore
266
+ * @default true
267
+ */
268
+ gitignore?: boolean | FlatGitignoreOptions;
269
+ /**
270
+ * Core rules. Can't be disabled.
271
+ */
272
+ javascript?: OptionsOverrides;
273
+ /**
274
+ * Enable TypeScript support.
275
+ *
276
+ * Passing an object to enable TypeScript Language Server support.
277
+ *
278
+ * @default auto-detect based on the dependencies
279
+ */
280
+ typescript?: boolean | OptionsTypescript;
281
+ /**
282
+ * Options for eslint-plugin-unicorn.
283
+ *
284
+ * @default true
285
+ */
286
+ unicorn?: boolean | OptionsOverrides;
287
+ /**
288
+ * Options for eslint-plugin-import-lite.
289
+ *
290
+ * @default true
291
+ */
292
+ imports?: boolean | OptionsOverrides;
293
+ /**
294
+ * Enable test support.
295
+ *
296
+ * @default true
297
+ */
298
+ test?: boolean | OptionsOverrides;
299
+ /**
300
+ * Enable Vue support.
301
+ *
302
+ * @default auto-detect based on the dependencies
303
+ */
304
+ vue?: boolean | OptionsVue;
305
+ /**
306
+ * Enable JSONC support.
307
+ *
308
+ * @default true
309
+ */
310
+ jsonc?: boolean | OptionsOverrides;
311
+ /**
312
+ * Enable YAML support.
313
+ *
314
+ * @default true
315
+ */
316
+ yaml?: boolean | OptionsOverrides;
317
+ /**
318
+ * Enable TOML support.
319
+ *
320
+ * @default true
321
+ */
322
+ toml?: boolean | OptionsOverrides;
323
+ /**
324
+ * Enable ASTRO support.
325
+ *
326
+ * Requires installing:
327
+ * - `eslint-plugin-astro`
328
+ *
329
+ * Requires installing for formatting .astro:
330
+ * - `prettier-plugin-astro`
331
+ *
332
+ * @default false
333
+ */
334
+ astro?: boolean | OptionsOverrides;
335
+ /**
336
+ * Enable linting for **code snippets** in Markdown.
337
+ *
338
+ * For formatting Markdown content, enable also `formatters.markdown`.
339
+ *
340
+ * @default true
341
+ */
342
+ markdown?: boolean | OptionsOverrides;
343
+ /**
344
+ * Enable stylistic rules.
345
+ *
346
+ * @see https://eslint.style/
347
+ * @default true
348
+ */
349
+ stylistic?: boolean | (StylisticConfig & OptionsOverrides);
350
+ /**
351
+ * Enable regexp rules.
352
+ *
353
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/
354
+ * @default true
355
+ */
356
+ regexp?: boolean | (OptionsRegExp & OptionsOverrides);
357
+ /**
358
+ * Enable pnpm (workspace/catalogs) support.
359
+ *
360
+ * Currently it's disabled by default, as it's still experimental.
361
+ * In the future it will be smartly enabled based on the project usage.
362
+ *
363
+ * @see https://github.com/antfu/pnpm-workspace-utils
364
+ * @experimental
365
+ * @default false
366
+ */
367
+ pnpm?: boolean;
368
+ /**
369
+ * Use external formatters to format files.
370
+ *
371
+ * Requires installing:
372
+ * - `eslint-plugin-format`
373
+ *
374
+ * When set to `true`, it will enable all formatters.
375
+ *
376
+ * @default false
377
+ */
378
+ formatters?: boolean | OptionsFormatters;
379
+ /**
380
+ * Control to disable some rules in editors.
381
+ * @default auto-detect based on the process.env
382
+ */
383
+ isInEditor?: boolean;
384
+ /**
385
+ * Enable AdonisJS support.
386
+ *
387
+ * Requires installing:
388
+ * - `@adonisjs/eslint-plugin`
389
+ *
390
+ * @default false
391
+ */
392
+ adonisjs?: boolean | OptionsAdonisJS;
393
+ /**
394
+ * Enable Nuxt support.
395
+ *
396
+ * Requires installing:
397
+ * - `@nuxt/eslint-plugin`
398
+ *
399
+ * @default false
400
+ */
401
+ nuxt?: boolean | OptionsNuxt;
402
+ }
403
+ //#endregion
404
+ export { Awaitable, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, Rules, StylisticConfig, TypedFlatConfigItem };
@@ -0,0 +1,42 @@
1
+ import { Awaitable, TypedFlatConfigItem } from "./types.js";
2
+
3
+ //#region src/utils.d.ts
4
+ declare const parserPlain: {
5
+ meta: {
6
+ name: string;
7
+ };
8
+ parseForESLint: (code: string) => {
9
+ ast: {
10
+ body: never[];
11
+ comments: never[];
12
+ loc: {
13
+ end: number;
14
+ start: number;
15
+ };
16
+ range: number[];
17
+ tokens: never[];
18
+ type: string;
19
+ };
20
+ scopeManager: null;
21
+ services: {
22
+ isPlain: boolean;
23
+ };
24
+ visitorKeys: {
25
+ Program: never[];
26
+ };
27
+ };
28
+ };
29
+ /**
30
+ * Combine array and non-array configs into a single array.
31
+ */
32
+ declare function combine(...configs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>[]): Promise<TypedFlatConfigItem[]>;
33
+ declare function toArray<T>(value: T | T[]): T[];
34
+ declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
35
+ default: infer U;
36
+ } ? U : T>;
37
+ declare function isPackageInScope(name: string): boolean;
38
+ declare function ensurePackages(packages: (string | undefined)[]): Promise<void>;
39
+ declare function isInEditorEnv(): boolean;
40
+ declare function isInGitHooksOrLintStaged(): boolean;
41
+ //#endregion
42
+ export { combine, ensurePackages, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, toArray };
package/dist/utils.js ADDED
@@ -0,0 +1,62 @@
1
+ import { isPackageExists } from "local-pkg";
2
+ import process from "node:process";
3
+ import { fileURLToPath } from "node:url";
4
+
5
+ //#region src/utils.ts
6
+ const scopeUrl = fileURLToPath(new URL(".", import.meta.url));
7
+ const isCwdInScope = isPackageExists("@eienjs/eslint-config");
8
+ const parserPlain = {
9
+ meta: { name: "parser-plain" },
10
+ parseForESLint: (code) => ({
11
+ ast: {
12
+ body: [],
13
+ comments: [],
14
+ loc: {
15
+ end: code.length,
16
+ start: 0
17
+ },
18
+ range: [0, code.length],
19
+ tokens: [],
20
+ type: "Program"
21
+ },
22
+ scopeManager: null,
23
+ services: { isPlain: true },
24
+ visitorKeys: { Program: [] }
25
+ })
26
+ };
27
+ /**
28
+ * Combine array and non-array configs into a single array.
29
+ */
30
+ async function combine(...configs) {
31
+ return (await Promise.all(configs)).flat();
32
+ }
33
+ function toArray(value) {
34
+ return Array.isArray(value) ? value : [value];
35
+ }
36
+ async function interopDefault(m) {
37
+ const resolved = await m;
38
+ return resolved.default || resolved;
39
+ }
40
+ function isPackageInScope(name) {
41
+ return isPackageExists(name, { paths: [scopeUrl] });
42
+ }
43
+ async function ensurePackages(packages) {
44
+ if (process.env.CI || !process.stdout.isTTY || !isCwdInScope) return;
45
+ const nonExistingPackages = packages.filter((i) => i && !isPackageInScope(i));
46
+ if (nonExistingPackages.length === 0) return;
47
+ const p = await import("@clack/prompts");
48
+ const packagesMissing = nonExistingPackages.join(", ");
49
+ const packagesMissingPlural = nonExistingPackages.length === 1 ? "Package is" : "Packages are";
50
+ if (await p.confirm({ message: `${packagesMissingPlural} required for this config: ${packagesMissing}. Do you want to install them?` })) await import("@antfu/install-pkg").then(async (i) => i.installPackage(nonExistingPackages, { dev: true }));
51
+ }
52
+ function isInEditorEnv() {
53
+ if (process.env.CI) return false;
54
+ if (isInGitHooksOrLintStaged()) return false;
55
+ return Boolean(process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM);
56
+ }
57
+ function isInGitHooksOrLintStaged() {
58
+ return Boolean(process.env.GIT_PARAMS || process.env.VSCODE_GIT_COMMAND || process.env.npm_lifecycle_script?.startsWith("lint-staged"));
59
+ }
60
+
61
+ //#endregion
62
+ export { combine, ensurePackages, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, toArray };
@@ -0,0 +1,121 @@
1
+ //#region src/vendored/prettier_types.d.ts
2
+ /**
3
+ * Vendor types from Prettier so we don't rely on the dependency.
4
+ */
5
+ type VendoredPrettierOptions = Partial<VendoredPrettierOptionsRequired>;
6
+ interface VendoredPrettierOptionsRequired {
7
+ /**
8
+ * Specify the line length that the printer will wrap on.
9
+ * @default 120
10
+ */
11
+ printWidth: number;
12
+ /**
13
+ * Specify the number of spaces per indentation-level.
14
+ */
15
+ tabWidth: number;
16
+ /**
17
+ * Indent lines with tabs instead of spaces
18
+ */
19
+ useTabs?: boolean;
20
+ /**
21
+ * Print semicolons at the ends of statements.
22
+ */
23
+ semi: boolean;
24
+ /**
25
+ * Use single quotes instead of double quotes.
26
+ */
27
+ singleQuote: boolean;
28
+ /**
29
+ * Use single quotes in JSX.
30
+ */
31
+ jsxSingleQuote: boolean;
32
+ /**
33
+ * Print trailing commas wherever possible.
34
+ */
35
+ trailingComma: 'none' | 'es5' | 'all';
36
+ /**
37
+ * Print spaces between brackets in object literals.
38
+ */
39
+ bracketSpacing: boolean;
40
+ /**
41
+ * Put the `>` of a multi-line HTML (HTML, XML, JSX, Vue, Angular) element at the end of the last line instead of being
42
+ * alone on the next line (does not apply to self closing elements).
43
+ */
44
+ bracketSameLine: boolean;
45
+ /**
46
+ * Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line.
47
+ * @deprecated use bracketSameLine instead
48
+ */
49
+ jsxBracketSameLine: boolean;
50
+ /**
51
+ * Format only a segment of a file.
52
+ */
53
+ rangeStart: number;
54
+ /**
55
+ * Format only a segment of a file.
56
+ * @default Number.POSITIVE_INFINITY
57
+ */
58
+ rangeEnd: number;
59
+ /**
60
+ * By default, Prettier will wrap markdown text as-is since some services use a linebreak-sensitive renderer.
61
+ * In some cases you may want to rely on editor/viewer soft wrapping instead, so this option allows you to opt out.
62
+ * @default "preserve"
63
+ */
64
+ proseWrap: 'always' | 'never' | 'preserve';
65
+ /**
66
+ * Include parentheses around a sole arrow function parameter.
67
+ * @default "always"
68
+ */
69
+ arrowParens: 'avoid' | 'always';
70
+ /**
71
+ * Provide ability to support new languages to prettier.
72
+ */
73
+ plugins: unknown[];
74
+ /**
75
+ * How to handle whitespaces in HTML.
76
+ * @default "css"
77
+ */
78
+ htmlWhitespaceSensitivity: 'css' | 'strict' | 'ignore';
79
+ /**
80
+ * Which end of line characters to apply.
81
+ * @default "lf"
82
+ */
83
+ endOfLine: 'auto' | 'lf' | 'crlf' | 'cr';
84
+ /**
85
+ * Change when properties in objects are quoted.
86
+ * @default "as-needed"
87
+ */
88
+ quoteProps: 'as-needed' | 'consistent' | 'preserve';
89
+ /**
90
+ * Whether or not to indent the code inside <script> and <style> tags in Vue files.
91
+ * @default false
92
+ */
93
+ vueIndentScriptAndStyle: boolean;
94
+ /**
95
+ * Enforce single attribute per line in HTML, XML, Vue and JSX.
96
+ * @default false
97
+ */
98
+ singleAttributePerLine: boolean;
99
+ /**
100
+ * How to handle whitespaces in XML.
101
+ * @default "preserve"
102
+ */
103
+ xmlQuoteAttributes: 'single' | 'double' | 'preserve';
104
+ /**
105
+ * Whether to put a space inside the brackets of self-closing XML elements.
106
+ * @default true
107
+ */
108
+ xmlSelfClosingSpace: boolean;
109
+ /**
110
+ * Whether to sort attributes by key in XML elements.
111
+ * @default false
112
+ */
113
+ xmlSortAttributesByKey: boolean;
114
+ /**
115
+ * How to handle whitespaces in XML.
116
+ * @default "ignore"
117
+ */
118
+ xmlWhitespaceSensitivity: 'ignore' | 'strict' | 'preserve';
119
+ }
120
+ //#endregion
121
+ export { VendoredPrettierOptions };