Skip to content

Commit

Permalink
fix(lint-staged): markdownlint and prettier can race on md files (#14907
Browse files Browse the repository at this point in the history
)

Co-authored-by: Leo McArdle <lmcardle@mozilla.com>
Co-authored-by: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 4, 2023
1 parent 539a8bf commit 3788517
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"*": "prettier --ignore-unknown --write",
"*.md": "markdownlint-cli2-fix"
"!*.md": "prettier --ignore-unknown --write",
"*.md": ["markdownlint-cli2 --fix", "prettier --write"]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"type": "module",
"scripts": {
"fix:json": "prettier -w \"**/*.json\"",
"fix:md": "markdownlint-cli2-fix \"**/*.md\" && prettier -w \"**/*.md\"",
"fix:md": "markdownlint-cli2 --fix \"**/*.md\" && prettier -w \"**/*.md\"",
"fix:yml": "prettier -w \"**/*.yml\"",
"lint:json": "prettier -c \"**/*.json\"",
"lint:md": "markdownlint-cli2 \"**/*.md\" && prettier -c \"**/*.md\"",
Expand Down

0 comments on commit 3788517

Please sign in to comment.