Skip to content

Commit

Permalink
feat: set prettier's default printWidth to 120
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Dec 25, 2023
1 parent a2d9b18 commit 84e4c85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/configs/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export async function formatters(
'error',
formater === 'prettier'
? {
printWidth: 120,
...prettierOptions,
embeddedLanguageFormatting: 'off',
parser: 'markdown',
Expand Down
5 changes: 5 additions & 0 deletions src/vender/prettier-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
export type VendoredPrettierOptions = Partial<VendoredPrettierOptionsRequired>

export interface VendoredPrettierOptionsRequired {
/**
* Specify the line length that the printer will wrap on.
* @default 120
*/
printWidth: number
/**
* Specify the number of spaces per indentation-level.
*/
Expand Down

0 comments on commit 84e4c85

Please sign in to comment.