File tree 4 files changed +10
-4
lines changed
4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ interface OptionsConfig {
234
234
* {
235
235
* "arrowParens": "avoid",
236
236
* "htmlWhitespaceSensitivity": "ignore"
237
- * "printWidth": 120 ,
237
+ * "printWidth": 80 ,
238
238
* "semi": false,
239
239
* "singleQuote": true,
240
240
* }
Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ export async function formatter(
29
29
parser,
30
30
}
31
31
32
+ const markdownRules = {
33
+ printWidth : 120 ,
34
+ ...rules ,
35
+ embeddedLanguageFormatting : 'off' ,
36
+ }
37
+
32
38
if ( plugins ?. length ) {
33
39
rules . plugins = [ ...( rules . plugins || [ ] ) , ...plugins ]
34
40
}
@@ -43,7 +49,7 @@ export async function formatter(
43
49
prettier : pluginPrettier ,
44
50
} ,
45
51
rules : {
46
- 'prettier/prettier' : [ 'warn' , rules ] ,
52
+ 'prettier/prettier' : [ 'warn' , parser === 'markdown' ? markdownRules : rules ] ,
47
53
} ,
48
54
}
49
55
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type { PartialPrettierExtendedOptions } from '../types'
3
3
export const DEFAULT_PRETTIER_RULES : PartialPrettierExtendedOptions = {
4
4
arrowParens : 'avoid' ,
5
5
htmlWhitespaceSensitivity : 'ignore' ,
6
- printWidth : 120 ,
6
+ printWidth : 80 ,
7
7
semi : false ,
8
8
singleQuote : true ,
9
9
}
Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ export interface OptionsConfig extends OptionsComponentExts {
234
234
* {
235
235
* "arrowParens": "avoid",
236
236
* "htmlWhitespaceSensitivity": "ignore"
237
- * "printWidth": 120 ,
237
+ * "printWidth": 80 ,
238
238
* "semi": false,
239
239
* "singleQuote": true,
240
240
* }
You can’t perform that action at this time.
0 commit comments