Skip to content

Markdownlint Showcase #9

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions markdownlint/.markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"outputFormatters": [["markdownlint-cli2-formatter-json"]],
"config": {
"default": true,
"MD001": true,
"MD002": true,
"MD022": true,
"MD031": true
Comment on lines +4 to +8
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Disable the global default before whitelisting specific rules

"default": true turns on every rule, then the explicit list immediately re-enables them again.
If you want to lint with only MD001/2/22/31, flip the flag to false (or drop it entirely and let the explicit mapping drive the set). This avoids surprises when markdownlint introduces new rules.

-    "default": true,
+    "default": false,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"default": true,
"MD001": true,
"MD002": true,
"MD022": true,
"MD031": true
"default": false,
"MD001": true,
"MD002": true,
"MD022": true,
"MD031": true
🤖 Prompt for AI Agents
In markdownlint/.markdownlint-cli2.jsonc around lines 4 to 8, the "default":
true setting enables all rules globally, which conflicts with the explicit rule
list and may cause unexpected linting when new rules are added. Change "default"
to false or remove it entirely so only the explicitly listed rules (MD001,
MD002, MD022, MD031) are enabled, preventing unintended rule activation.

}
}

11 changes: 11 additions & 0 deletions markdownlint/test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: test
version: 1.0
items:
- id: 1
name: Item One
- id: 2
name: Item Two
- id: 3
name: Item Three
Comment on lines +4 to +9
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Normalise list indentation

Each list item should start at the same column. Current mixture of 2- and 3-space indents violates MD007.

-items:
-  - id: 1
-    name: Item One  
-  - id: 2
-   name: Item Two
-  - id: 3
-    name: Item Three    
+items:
+  - id: 1
+    name: Item One
+  - id: 2
+    name: Item Two
+  - id: 3
+    name: Item Three

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 LanguageTool

[grammar] ~6-~6: Ensure spelling is correct
Context: ... - id: 1 name: Item One - id: 2 name: Item Two - id: 3 name: Item Three...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.17.2)

4-4: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


6-6: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


8-8: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)

🤖 Prompt for AI Agents
In markdownlint/test.md around lines 4 to 9, the list items have inconsistent
indentation with a mix of 2 and 3 spaces. Normalize the indentation so that each
list item starts at the same column, using consistent spaces (preferably 2
spaces) before each list item to comply with MD007.

... trailing dot