Updated to ignore MD032, MD031 and MD047 #6
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
name: Markdown Lint | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install markdownlint-cli | |
run: npm install -g markdownlint-cli | |
- name: Create markdownlint configuration | |
run: | | |
echo '{ | |
"MD013": { | |
"line_length": 600, // Sets a high line length limit (600 characters) | |
"ignore_urls": true, // Ignores long lines that contain URLs | |
"ignore_code_blocks": true, // Ignores long lines within code blocks | |
"ignore_tables": true // Ignores long lines within tables | |
}, | |
"MD026": { | |
"punctuation": ".,;:!?" // Keeps rule for trailing punctuation, but can customize punctuation marks | |
}, | |
"MD032": false, // Ignores rule for blank lines around lists | |
"MD031": false, // Ignores rule for blank lines around fenced code blocks | |
"MD047": false // Ignores rule for a single trailing newline at the end of files | |
}' > .markdownlint.json | |
- name: Run markdownlint | |
run: markdownlint '**/*.md' |