opinionated linter for config files. yaml, json, toml.
npm i -g execblock
check files:
execblock check config.yaml
rules:
- no tabs (use spaces)
- consistent quotes
- sorted keys (optional)
- trailing commas
- max line length 120
execblock fix config.yaml
# .github/workflows/lint.yml
- run: execblock check *.{yaml,json,toml}# .execblock.yaml
rules:
sorted-keys: false
max-line-length: 200exit code 0 if pass, 1 if fail.