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

chore(lint): Fixed 90-95% of Markdown lint violations across the repository #12587

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix(ci): Corrected Markdown file change detection in workflows markdo…
…wn-lint.yml

Signed-off-by: Brijeshthummar02 <brijeshthummar02@gmail.com>

:wq
  • Loading branch information
Brijeshthummar02 committed Feb 26, 2025
commit 38867ef711224f192b72472a6e11cd34f9251fe5
36 changes: 36 additions & 0 deletions .github/workflows/markdown-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Markdown Lint Check

on:
pull_request:
paths:
- '**/*.md'
push:
branches:
- main

jobs:
markdown-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Check if Markdown Files Changed
id: check_changes
run: |
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E '\.md$'; then
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "changed=false" >> $GITHUB_OUTPUT
fi
- name: Install Markdownlint
if: steps.check_changes.outputs.changed == 'true'
run: |
sudo apt-get update
sudo apt-get install -y markdownlint-cli
- name: Run Markdownlint Check
if: steps.check_changes.outputs.changed == 'true'
run: |
markdownlint '**/*.md' --config .markdownlint.json
69 changes: 69 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"code-block-style": {
"style": "fenced"
},
"code-fence-style": {
"style": "backtick"
},
"emphasis-style": {
"style": "asterisk"
},
"extended-ascii": {
"ascii-only": true
},
"fenced-code-language": {
"allowed_languages": [
"bash",
"go",
"html",
"javascript",
"json",
"markdown",
"text"
],
"language_only": true
},
"heading-style": {
"style": "atx"
},
"hr-style": {
"style": "---"
},
"line-length": {
"strict": true,
"code_blocks": false
},
"link-image-style": {
"collapsed": false,
"shortcut": false,
"url_inline": false
},
"no-duplicate-heading": {
"siblings_only": true
},
"ol-prefix": {
"style": "ordered"
},
"proper-names": {
"code_blocks": false,
"names": [
"Cake.Markdownlint",
"CommonMark",
"JavaScript",
"Markdown",
"markdown-it",
"markdownlint",
"Node.js",
"Go"
]
},
"reference-links-images": {
"shortcut_syntax": true
},
"strong-style": {
"style": "asterisk"
},
"ul-style": {
"style": "dash"
}
}