-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: init markdown-lint and resolve linter issues (#39)
Closes: WORLD-983 ## Overview Add markdown linter ## Brief Changelog - https://github.com/marketplace/actions/markdown-lint - fix markdown linter issues - customize markdown linter config: - increase `MD013/line-length` default line length from 80 (too short), to 250 (median "looks good" line length in our docs) - add `MD033/no-inline-html` necessary allowed HTML element ## Testing and Verifying - CI passed - Lint error annotation detected on changed code: ![image](https://github.com/Argus-Labs/world-engine/assets/29672212/01907dea-6de6-413e-aac8-d92e9734c00b) ![image](https://github.com/Argus-Labs/world-engine/assets/29672212/3664194a-5ee8-4e68-be79-c6784a63501f)
- Loading branch information
Showing
4 changed files
with
60 additions
and
12 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Lint | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
paths: | ||
- "**.md" | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**.md" | ||
|
||
jobs: | ||
lint-md: | ||
name: Markdown | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
## detect errors from markdownlint-cli and create annotations for them | ||
- uses: xt0rted/markdownlint-problem-matcher@v3 | ||
- uses: articulate/actions-markdownlint@v1 | ||
with: | ||
config: .markdownlint.yaml | ||
ignore: vendor | ||
version: 0.39.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
# Default state for all rules | ||
default: true | ||
|
||
# MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md013.md | ||
MD013: | ||
## Increase line length from default '80' | ||
line_length: 250 | ||
## exluce code_blocks from line linter | ||
code_blocks: false | ||
|
||
# MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md033.md | ||
MD033: | ||
allowed_elements: | ||
- img | ||
- div | ||
- br | ||
- a | ||
- pre | ||
- h1 | ||
- p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters