Skip to content

Commit

Permalink
docs: properly handle links check
Browse files Browse the repository at this point in the history
Ref: #259
Signed-off-by: Tomas Dvorak <[email protected]>
  • Loading branch information
Tomas2D committed Jan 22, 2025
1 parent 3b1ec37 commit c713192
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
yarn lint-staged

MD_FILES=$(git diff --cached --name-only | grep -E '^docs/.+\.md$' | tr '\n' ' ')
if [ -n "$MD_FILES" ]; then
yarn docs:links -- $MD_FILES
fi

CI=true yarn copyright:check && yarn docs:check && yarn lint && yarn format && yarn ts:check && yarn run test:unit
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@
"lint-staged": {
"{src,tests,scripts}/**/*": "yarn copyright",
"*": "prettier --ignore-unknown --write",
"*.{ts,js}": "eslint --fix",
"docs/**/*.md": "yarn docs:links"
"*.{ts,js}": "eslint --fix"
},
"prettier": {
"printWidth": 100,
Expand Down

0 comments on commit c713192

Please sign in to comment.