|
8 | 8 | # Run with: |
9 | 9 | # npx markdownlint-cli2 --fix |
10 | 10 |
|
| 11 | +# === Set the scope of files to check === |
| 12 | + |
| 13 | +# Check these types of files |
11 | 14 | globs: |
12 | 15 | - "**/*.md" |
13 | 16 |
|
| 17 | +# Do not check these files or directories |
14 | 18 | ignores: |
15 | 19 | - ".lake/**" |
16 | 20 | - "**/.lake/**" |
17 | | - - ".venv/**" |
18 | | - - "**/.venv/**" |
19 | | - - "node_modules/**" |
20 | | - - "**/node_modules/**" |
21 | | - - "site/**" |
22 | | - - "**/site/**" |
23 | | - - "dist/**" |
24 | | - - "**/dist/**" |
25 | | - - "build/**" |
26 | | - - "**/build/**" |
27 | | - - ".ruff_cache/**" |
28 | | - - "**/.ruff_cache/**" |
29 | | - - ".pytest_cache/**" |
30 | | - - "**/.pytest_cache/**" |
31 | 21 | - ".mypy_cache/**" |
32 | 22 | - "**/.mypy_cache/**" |
| 23 | + - ".nox/**" |
| 24 | + - "**/.nox/**" |
33 | 25 | - ".pyright/**" |
34 | 26 | - "**/.pyright/**" |
| 27 | + - ".pytest_cache/**" |
| 28 | + - "**/.pytest_cache/**" |
| 29 | + - ".ruff_cache/**" |
| 30 | + - "**/.ruff_cache/**" |
35 | 31 | - ".tox/**" |
36 | 32 | - "**/.tox/**" |
37 | | - - ".nox/**" |
38 | | - - "**/.nox/**" |
39 | 33 | - ".uv-cache/**" |
40 | 34 | - "**/.uv-cache/**" |
| 35 | + - ".venv/**" |
| 36 | + - "**/.venv/**" |
| 37 | + - "build/**" |
| 38 | + - "**/build/**" |
| 39 | + - "dist/**" |
| 40 | + - "**/dist/**" |
41 | 41 | - "htmlcov/**" |
42 | 42 | - "**/htmlcov/**" |
| 43 | + - "node_modules/**" |
| 44 | + - "**/node_modules/**" |
| 45 | + - "site/**" |
| 46 | + - "**/site/**" |
43 | 47 | - "LICENSE" |
44 | 48 | - "CODEOWNERS" |
45 | 49 |
|
| 50 | + |
| 51 | +# === Configure rules === |
| 52 | + |
46 | 53 | config: |
47 | | - default: true # WHY: This enables all default rules, which is a good starting point for linting Markdown files. |
| 54 | + |
| 55 | + default: true # WHY: Enables all default rules, which is a good starting point for linting Markdown files. |
48 | 56 |
|
49 | 57 | MD013: |
50 | 58 | line_length: 100 |
51 | | - headings: false # WHY: This allows long headings, which can be necessary for clarity and SEO in Markdown files. |
52 | | - tables: false # WHY: This allows long table cells, which can be necessary for readability and completeness in Markdown files. |
53 | | - code_blocks: false # WHY: This allows long lines in code blocks, which can be necessary for readability and completeness in Markdown files. |
| 59 | + headings: false # WHY: Allows long headings for clarity and SEO in Markdown files. |
| 60 | + tables: false # WHY: Allows long table cells for readability and completeness in Markdown files. |
| 61 | + code_blocks: false # WHY: Allows long lines in code blocks for readability and completeness in Markdown files. |
54 | 62 |
|
55 | | - MD025: false # WHY: This allows multiple top-level headings, which can be necessary in Markdown files that are not strictly linear documents (e.g., README files, documentation index files). |
| 63 | + MD025: false # WHY: Allow multiple H1 headings when a file is not a linear document. |
56 | 64 |
|
57 | 65 | MD033: |
58 | 66 | allowed_elements: |
59 | | - - mark # WHY: Mark elements are often used in Markdown files for highlighting, and this allows them without triggering a lint error. |
60 | | - - meta # WHY: Metadata is often needed in Markdown files, and this allows it without triggering a lint error. |
61 | | - - link # WHY: Links are common in Markdown files, and this allows them without triggering a lint error. |
62 | | - - details # WHY: Details elements are often used in Markdown files, and this allows them without triggering a lint error. |
63 | | - - summary # WHY: Summary elements are often used in Markdown files, and this allows them without triggering a lint error. |
| 67 | + - details # collapsible sections |
| 68 | + - img # images |
| 69 | + - link # links |
| 70 | + - mark # highlighting |
| 71 | + - meta # metadata |
| 72 | + - summary # summary elements |
0 commit comments