Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable markdown linter for kits #674

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/lint-on-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,8 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Run markdown lint
- name: Run markdown lint for docs folder
run: npm run lint-doc

- name: Run markdown lint for docs-kits folder
run: npm run lint-kits
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ We do want to follow a specific style for our markdown based documentation.
Therefore, this repository is configured to use a [markdown linter](https://github.com/DavidAnson/markdownlint-cli2).
Specific rules are configured via [.markdownlint.yaml](./.markdownlint.yaml).

Additionally, there is a npm script `lint-doc`, that will lint all the markdown files inside [docs](./docs).
Additionally, there is a npm script `lint-doc`, that will lint all the markdown files inside [docs](./docs) and `lint-kits`, that will lint all the markdown files inside [docs-kits](./docs-kits).
This script is also run as a pre-commit hook, set up via [husky](https://www.npmjs.com/package/husky).
You can also run the linting step manually by running `npm run lint-doc`.
You can also run the linting step manually by running `npm run lint-doc` or `npm run lint-kits`.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"lint-doc": "markdownlint-cli2-config .markdownlint.yaml \"docs/**/*.md\" \"#node_modules\"",
"lint-kits": "markdownlint-cli2-config .markdownlint.yaml \"docs-kits/**/*.md\" \"#node_modules\"",
"prepare": "husky install"
},
"dependencies": {
Expand Down
Loading