markdownlint icon indicating copy to clipboard operation
markdownlint copied to clipboard

MD004 overwritten by prettier

Open CWSites opened this issue 1 year ago • 3 comments

I have both markdownlint and prettier configured for my project. I observed that prettier is overwriting my unordered list options (it auto changes + and * to -) and was wondering if there is a way to prevent this from happening?

The only thing I can think of right now is to have prettier ignore .md files, but this isn't ideal.

When researching prettier's approach I came across this issue which I believe is the root cause. https://github.com/prettier/prettier/issues/4251

CWSites avatar Apr 18 '24 17:04 CWSites

I'm not a prettier user and don't have recommendations for how to configure it, sorry.

DavidAnson avatar Apr 18 '24 19:04 DavidAnson

Thanks for your quick reply. I'm wondering if anyone else that uses this has any suggestions of how they get past this?

CWSites avatar Apr 26 '24 15:04 CWSites

Prettier intentionally limits how much it can be configured, which includes providing no option to change the style of Markdown unordered lists. If you want a formatter that is less opinionated, then Prettier is probably not the tool for you.

aphedges avatar May 03 '24 19:05 aphedges

Looks like I'll just stick with adding .md to my .prettierignore.

CWSites avatar May 10 '24 14:05 CWSites