Skip to content

Commit 023979b

Browse files
committed
Added manual fixing option for Markdown
1 parent 01d5692 commit 023979b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ We recommend that you set a pre-commit hook to lint and fix issues automatically
2626

2727
```sh
2828
npm run lint:markdown-fix:staged
29+
# or, if you want to fix manually
30+
npm run lint:markdown:staged
2931
```
3032

3133
to a file named `./.git/hooks/pre-commit` and making it executable `chmod +x ./.git/hooks/pre-commit`

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"lint:scripts": "eslint assets/js config functions",
2727
"lint:styles": "stylelint \"assets/scss/**/*.{css,sass,scss,sss,less}\"",
2828
"lint:markdown": "markdownlint-cli2 \"*.md\" \"content/**/*.md\"",
29+
"lint:markdown:staged": "shx echo $(git diff --diff-filter=d --cached --name-only | grep -E '\\.md$') | xargs markdownlint-cli2",
2930
"lint:markdown-fix": "markdownlint-cli2 --fix \"*.md\" \"content/**/*.md\"",
3031
"lint:markdown-fix:staged": "shx echo $(git diff --diff-filter=d --cached --name-only | grep -E '\\.md$') | xargs markdownlint-cli2 --fix",
3132
"server": "exec-bin node_modules/.bin/hugo/hugo server",

0 commit comments

Comments
 (0)