Skip to content

Commit

Permalink
fix(prettier): format mdx properly
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed May 25, 2024
1 parent b68d48b commit 40fc0b2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions configs/prettier.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ export default {
useTabs: false,
},
},
{
files: ['**/*.mdx'],
options: {
// This stinks, if you don't do this, then an inline component on the
// end of the line will end up wrapping, then the next save prettier
// will add an extra line break. Super annoying and probably a bug in
// prettier, but until it's fixed, this is the best we can do.
proseWrap: 'preserve',
htmlWhitespaceSensitivity: 'ignore',
},
},
],
plugins: ['prettier-plugin-tailwindcss'],
tailwindAttributes: ['class', 'className', 'ngClass', '.*[cC]lassName'],
Expand Down

0 comments on commit 40fc0b2

Please sign in to comment.