File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ interface OptionsConfig {
234234 * {
235235 * "arrowParens": "avoid",
236236 * "htmlWhitespaceSensitivity": "ignore"
237- * "printWidth": 120 ,
237+ * "printWidth": 80 ,
238238 * "semi": false,
239239 * "singleQuote": true,
240240 * }
Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ export async function formatter(
2929 parser,
3030 }
3131
32+ const markdownRules = {
33+ printWidth : 120 ,
34+ ...rules ,
35+ embeddedLanguageFormatting : 'off' ,
36+ }
37+
3238 if ( plugins ?. length ) {
3339 rules . plugins = [ ...( rules . plugins || [ ] ) , ...plugins ]
3440 }
@@ -43,7 +49,7 @@ export async function formatter(
4349 prettier : pluginPrettier ,
4450 } ,
4551 rules : {
46- 'prettier/prettier' : [ 'warn' , rules ] ,
52+ 'prettier/prettier' : [ 'warn' , parser === 'markdown' ? markdownRules : rules ] ,
4753 } ,
4854 }
4955
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type { PartialPrettierExtendedOptions } from '../types'
33export const DEFAULT_PRETTIER_RULES : PartialPrettierExtendedOptions = {
44 arrowParens : 'avoid' ,
55 htmlWhitespaceSensitivity : 'ignore' ,
6- printWidth : 120 ,
6+ printWidth : 80 ,
77 semi : false ,
88 singleQuote : true ,
99}
Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ export interface OptionsConfig extends OptionsComponentExts {
234234 * {
235235 * "arrowParens": "avoid",
236236 * "htmlWhitespaceSensitivity": "ignore"
237- * "printWidth": 120 ,
237+ * "printWidth": 80 ,
238238 * "semi": false,
239239 * "singleQuote": true,
240240 * }
You can’t perform that action at this time.
0 commit comments