Skip to content

Commit

Permalink
Add pre-commit linters
Browse files Browse the repository at this point in the history
  • Loading branch information
ElPaisano committed Aug 18, 2023
1 parent 9881289 commit e3ebb47
Show file tree
Hide file tree
Showing 14 changed files with 1,439 additions and 5 deletions.
25 changes: 25 additions & 0 deletions .mdlc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"ignorePatterns": [
{
"pattern": "https://www.coingecko.com/"
},
{
"pattern": "https://defillama.com/"
},
{
"pattern": "https://docs.zondax.ch"
},
{
"pattern": "https://token.im/"
}
],
"httpHeaders": [
{
"urls": ["https://github.com/", "https://guides.github.com/", "https://help.github.com/", "https://docs.github.com/"],
"headers": {
"Accept-Encoding": "zstd, br, gzip, deflate"
}
}
],
"aliveStatusCodes": [200, 206, 400, 403, 429]
}
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repos:
- repo: https://github.com/errata-ai/vale
rev: 5df0693
hooks:
- id: vale
name: SYNC VALE STYLES AND DICTIONARY
pass_filenames: false
args: [sync]
- id: vale
name: RUN VALE LINTER
files: '\.md$'
8 changes: 4 additions & 4 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
StylesPath = .github/styles
StylesPath = styles
MinAlertLevel = suggestion

IgnoredScopes = code, tt
Packages = write-good

[*.md]
BasedOnStyles = ipfs-docs-style
[*]
BasedOnStyles = Vale, write-good
2 changes: 1 addition & 1 deletion pre-commit-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [ ${#mdFileList} -gt 0 ]; then
echo $regularBar
echo "${bold}Link check${normal}"
echo $regularBar
npx markdown-link-check --config .mdlinkcheck-config.json -q -p $mdFileList "$@"
npx markdown-link-check --config .mdlc.json -q -p $mdFileList "$@"
linksPassed=$?

echo " "
Expand Down
Loading

0 comments on commit e3ebb47

Please sign in to comment.