[GH-ISSUE #1179] MD004 overwritten by prettier #2479

Closed
opened 2026-03-07 20:08:09 +03:00 by kerem · 4 comments
Owner

Originally created by @CWSites on GitHub (Apr 18, 2024).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1179

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

Originally created by @CWSites on GitHub (Apr 18, 2024). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1179 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
kerem 2026-03-07 20:08:09 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Apr 18, 2024):

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

<!-- gh-comment-id:2065013856 --> @DavidAnson commented on GitHub (Apr 18, 2024): I'm not a prettier user and don't have recommendations for how to configure it, sorry.
Author
Owner

@CWSites commented on GitHub (Apr 26, 2024):

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

<!-- gh-comment-id:2079569820 --> @CWSites commented on GitHub (Apr 26, 2024): Thanks for your quick reply. I'm wondering if anyone else that uses this has any suggestions of how they get past this?
Author
Owner

@aphedges commented on GitHub (May 3, 2024):

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.

<!-- gh-comment-id:2093616599 --> @aphedges commented on GitHub (May 3, 2024): 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.
Author
Owner

@CWSites commented on GitHub (May 10, 2024):

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

<!-- gh-comment-id:2104708664 --> @CWSites commented on GitHub (May 10, 2024): Looks like I'll just stick with adding `.md` to my `.prettierignore`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2479
No description provided.