@@ -37,6 +37,7 @@ export function prettierConfig(config?: PrettierConfig) {
37
37
38
38
const defaultConfig = {
39
39
printWidth : 90 ,
40
+ tabWidth : 2 ,
40
41
useTabs : true ,
41
42
semi : true ,
42
43
singleQuote : false ,
@@ -52,8 +53,8 @@ export function prettierConfig(config?: PrettierConfig) {
52
53
} ;
53
54
config . languageOverrides ??= { } ;
54
55
55
- // Dynamically add processors. We need just the original source to pass to Prettier. So if
56
- // the file is already parsed by another ESLint parser, we need to create a virtual file.
56
+ // Dynamically add processors. We need just the original source to pass to Prettier. So if the
57
+ // file is already parsed by another ESLint parser, we need to create a virtual file.
57
58
const processors : Array < FlatConfig . Config > = [ ] ;
58
59
const selectGlob = ( a : string , processor : FlatConfig . Processor ) => {
59
60
if ( globIsUsed ( a ) ) {
@@ -172,11 +173,11 @@ export function prettierConfig(config?: PrettierConfig) {
172
173
}
173
174
174
175
/**
175
- * Make files available under a `.format` extension. This is necessary for all filetypes
176
- * that have a custom parser configured.
176
+ * Make files available under a `.format` extension. This is necessary for all filetypes that have
177
+ * a custom parser configured.
177
178
*
178
- * ESLint only supports a single parser per file-type. Through config merging, the 'plain'
179
- * parser we use above would always overwrite specific parsers.
179
+ * ESLint only supports a single parser per file-type. Through config merging, the 'plain' parser
180
+ * we use above would always overwrite specific parsers.
180
181
*
181
182
* This is kinda hacky and not exactly sure what the consequences are yet...
182
183
*/
@@ -187,8 +188,8 @@ function formatProcessor(): FlatConfig.Processor {
187
188
version : "-" ,
188
189
} ,
189
190
preprocess ( text : string , filename : string ) : Array < string | Linter . ProcessorFile > {
190
- // Passes through the original file, and includes one with the `.format` prefix. This
191
- // is also called a 'virtual' file.
191
+ // Passes through the original file, and includes one with the `.format` prefix. This is also
192
+ // called a 'virtual' file.
192
193
return [
193
194
text ,
194
195
{
0 commit comments