Linting Guide
In order to have a clean content repository regarding all markdown files we enforce linting on:
- all staged files prior committing
- all Pull Requests
Pre Commit
Run markdownlint against staged git files with Husky git hook:
The rules are enforced on markdown files, for which we use:
- markdownlint-cli2 for markdownlint
- prettier for code formatting
The markdownlint rules are defined in the configuration file .markdownlint-cli2.jsonc
Additionally we use markdownlint-rule-search-replace for fixing
Local Usage for development
npm run lint:md <file>
npm run fix:md <file>
Github Workflows
There are two actions running on every Pull Request on the main
branch.
link-validator.yml
is checking every link in markdown files.pr-markdownlint.yml
is checking all markdown files regarding to the rules defined within.markdownlint-cli2.jsonc