Skip to content

Commit 760f7b9

Browse files
[CI] Possible fix for regression caused by #214
Changes in file .github/workflows/markdown-lint.yml: - Possible fix for missing markdownlint with local install. Changes in file package.json: - added script config
1 parent d837452 commit 760f7b9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/markdown-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ jobs:
6363
if: ${{ !cancelled() }}
6464
run: |
6565
git ls-files --exclude-standard -z -- *.md **/*.md |\
66-
xargs -0 -I{} markdownlint "{}" --config .markdownlint.yaml ;
66+
xargs -0 -I{} "npm lint:md -- '{}' --config .markdownlint.yaml" ;
6767
6868
- name: Lint Markdown Files with JSON config
6969
if: ${{ !cancelled() }}
7070
run: |
7171
git ls-files --exclude-standard -z -- *.md **/*.md |\
72-
xargs -0 -I{} markdownlint "{}" --config .markdownlint.json ;
72+
xargs -0 -I{} "npm lint:md -- '{}' --config .markdownlint.json" ;

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@
22
"devDependencies": {
33
"markdownlint": "^0.31.1",
44
"markdownlint-cli": "^0.37.0"
5+
},
6+
"scripts": {
7+
"lint:md": "command -v markdownlint >/dev/null && markdownlint ${@:2} || npx markdownlint ${@:2}",
8+
"fix:md": "command -v markdownlint >/dev/null && markdownlint --fix ${@:2} || npx markdownlint --fix ${@:2}"
59
}
610
}

0 commit comments

Comments
 (0)