Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/js-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: JS Lint
on:
push:
paths:
- '.markdownlint-rules/**/*.js'
- 'markdownlint-rules/**/*.js'
- 'eslint.config.cjs'
- 'package.json'
- 'package-lock.json'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-readmes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ on:
- '**/README.md'
- '.markdownlint-cli2.jsonc'
- '.markdownlint.yml'
- '.markdownlint-rules/**'
- 'markdownlint-rules/**'
- 'Makefile'
pull_request:
paths:
- '**/README.md'
- '.markdownlint-cli2.jsonc'
- '.markdownlint.yml'
- '.markdownlint-rules/**'
- 'markdownlint-rules/**'
- 'Makefile'

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/markdownlint-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ on:
paths:
- '.markdownlint-cli2.jsonc'
- '.markdownlint.yml'
- '.markdownlint-rules/**'
- 'markdownlint-rules/**'
- 'md_test_files/**'
pull_request:
paths:
- '.markdownlint-cli2.jsonc'
- '.markdownlint.yml'
- '.markdownlint-rules/**'
- 'markdownlint-rules/**'
- 'md_test_files/**'

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rule-unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Rule unit tests

# Unit tests for .markdownlint-rules/*.js (Node test runner) with coverage (fails if any file < 90%).
# Unit tests for markdownlint-rules/*.js (Node test runner) with coverage (fails if any file < 90%).
# NOTE: Keep in sync with the 'test-rules' and 'test-rules-coverage' targets in the root Makefile.

on:
push:
paths:
- '.markdownlint-rules/**/*.js'
- 'markdownlint-rules/**/*.js'
- 'test/markdownlint-rules/**'
- 'package.json'
- 'package-lock.json'
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ coverage.*
# Ignore Python cache files
**/__pycache__/
.pytest_cache/

# Ignore test files
md_test_files/negative_document_length.md
13 changes: 7 additions & 6 deletions .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
"**/*.plan.md"
],
"customRules": [
".markdownlint-rules/no-heading-like-lines.js",
".markdownlint-rules/allow-custom-anchors.js",
".markdownlint-rules/no-duplicate-headings-normalized.js",
".markdownlint-rules/heading-numbering.js",
".markdownlint-rules/heading-title-case.js",
".markdownlint-rules/ascii-only.js"
"markdownlint-rules/no-heading-like-lines.js",
"markdownlint-rules/allow-custom-anchors.js",
"markdownlint-rules/no-duplicate-headings-normalized.js",
"markdownlint-rules/heading-numbering.js",
"markdownlint-rules/heading-title-case.js",
"markdownlint-rules/ascii-only.js",
"markdownlint-rules/document-length.js"
]
}
251 changes: 29 additions & 222 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -1,254 +1,61 @@
---
# Example markdownlint YAML configuration with all properties set to their default value
# markdownlint configuration: default built-in rules plus custom rule overrides

# Default state for all rules
default: true

# Path to configuration file to extend
# extends: null

# MD001/heading-increment/header-increment - Heading levels should only increment by one level at a time
MD001: true

# MD002/first-heading-h1/first-header-h1 - First heading should be a top-level heading
MD002:
# Heading level
level: 1

# MD003/heading-style/header-style - Heading style
MD003:
# Heading style
style: "consistent"

# MD004/ul-style - Unordered list style
MD004:
# List style
style: "consistent"

# MD005/list-indent - Inconsistent indentation for list items at the same level
MD005: true

# MD006/ul-start-left - Consider starting bulleted lists at the beginning of the line
MD006: true

# MD007/ul-indent - Unordered list indentation
MD007:
# Spaces for indent
indent: 2
# Whether to indent the first level of the list
start_indented: false

# MD009/no-trailing-spaces - Trailing spaces
MD009:
# Spaces for line break
br_spaces: 2
# Allow spaces for empty lines in list items
list_item_empty_lines: false
# Include unnecessary breaks
strict: false

# MD010/no-hard-tabs - Hard tabs
MD010:
# Include code blocks
code_blocks: true
# Number of spaces for each hard tab
# spaces_per_tab: 1

# MD011/no-reversed-links - Reversed link syntax
MD011: true

# MD012/no-multiple-blanks - Multiple consecutive blank lines
MD012:
# Consecutive blank lines
maximum: 1

# MD013/line-length - Line length
# MD013/line-length - line length limits (non-default)
MD013:
# Number of characters
line_length: 500
# Number of characters for headings
heading_line_length: 500
# Number of characters for code blocks
code_block_line_length: 500
# Include code blocks
code_blocks: true
# Include tables
tables: true
# Include headings
headings: true
# Strict length checking
strict: false
# Stern length checking
stern: false

# MD014/commands-show-output - Dollar signs used before commands without showing output
MD014: true

# MD018/no-missing-space-atx - No space after hash on atx style heading
MD018: true

# MD019/no-multiple-space-atx - Multiple spaces after hash on atx style heading
MD019: true

# MD020/no-missing-space-closed-atx - No space inside hashes on closed atx style heading
MD020: true

# MD021/no-multiple-space-closed-atx - Multiple spaces inside hashes on closed atx style heading
MD021: true

# MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines
MD022:
# Blank lines above heading
lines_above: 1
# Blank lines below heading
lines_below: 1

# MD023/heading-start-left/header-start-left - Headings must start at the beginning of the line
MD023: true

# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
MD024:
# Only check sibling headings
siblings_only: false

# MD025/single-title/single-h1 - Multiple top-level headings in the same document
MD025:
# Heading level
level: 1
# RegExp for matching title in front matter
front_matter_title: "^\\s*title\\s*[:=]"

# MD026/no-trailing-punctuation - Trailing punctuation in heading
MD026:
# Punctuation characters
punctuation: ".,;:!。,;:!"

# MD027/no-multiple-space-blockquote - Multiple spaces after blockquote symbol
MD027: true

# MD028/no-blanks-blockquote - Blank line inside blockquote
MD028: true

# MD029/ol-prefix - Ordered list item prefix
MD029:
# List style
style: "one_or_ordered"

# MD030/list-marker-space - Spaces after list markers
MD030:
# Spaces for single-line unordered list items
ul_single: 1
# Spaces for single-line ordered list items
ol_single: 1
# Spaces for multi-line unordered list items
ul_multi: 1
# Spaces for multi-line ordered list items
ol_multi: 1

# MD031/blanks-around-fences - Fenced code blocks should be surrounded by blank lines
MD031:
# Include list items
list_items: true

# MD032/blanks-around-lists - Lists should be surrounded by blank lines
MD032: true

# MD033/no-inline-html - Inline HTML
# MD033/no-inline-html - allow anchor elements for custom anchors
MD033:
# Allowed elements
allowed_elements: ["a"]

# MD034/no-bare-urls - Bare URL used
MD034: true

# MD035/hr-style - Horizontal rule style
MD035:
# Horizontal rule style
style: "consistent"

# MD036/no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading
MD036:
# Punctuation characters
punctuation: ".,;:!?。,;:!?"

# MD037/no-space-in-emphasis - Spaces inside emphasis markers
MD037: true

# MD038/no-space-in-code - Spaces inside code span elements
MD038: true

# MD039/no-space-in-links - Spaces inside link text
MD039: true

# MD040/fenced-code-language - Fenced code blocks should have a language specified
MD040: true

# MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading
MD041:
# Heading level
level: 1
# RegExp for matching title in front matter
front_matter_title: "^\\s*title\\s*[:=]"

# MD042/no-empty-links - No empty links
MD042: true

# MD043/required-headings/required-headers - Required heading structure
# MD043:
# List of headings
# headings: ["*"]
# List of headings
# headers: []

# MD044/proper-names - Proper names should have the correct capitalization
MD044:
# List of proper names
names: []
# Include code blocks
code_blocks: true

# MD045/no-alt-text - Images should have alternate text (alt text)
MD045: true

# MD046/code-block-style - Code block style
MD046:
# Block style
style: "consistent"

# MD047/single-trailing-newline - Files should end with a single newline character
MD047: true

# MD048/code-fence-style - Code fence style
MD048:
# Code fence style
style: "consistent"

# MD060/table-column-style - Table column style
MD060:
# Table column style
style: "aligned"

# ascii-only: no built-in path/emoji defaults; set paths and emoji in config
# - allowedUnicode: optional; single chars allowed in all files (no default)
# - unicodeReplacements: optional; if omitted, rule uses built-in defaults (arrows, quotes, <=>=*)
# ascii-only: disallow non-ASCII except in configured paths; inline code (backticks) always stripped
# No built-in path/emoji defaults. Options:
# - allowedPathPatternsUnicode: glob list; files where any non-ASCII is allowed
# - allowedPathPatternsEmoji: glob list; files where only allowedEmoji chars are allowed
# - allowedEmoji: emoji/chars allowed in paths matching allowedPathPatternsEmoji (multi-codepoint OK)
# - allowedUnicode: chars allowed in all files; extends default set (é, ï, ñ, ç, etc.) unless replace below
# - allowedUnicodeReplaceDefault: true = use only allowedUnicode list (no default set)
# - allowUnicodeInCodeBlocks: true (default) = skip fenced blocks; false = check them for unicode
# - disallowUnicodeInCodeBlockTypes: when allowUnicodeInCodeBlocks false, only these block types checked
# (block type = first word after opening fence, e.g. "text" from ```text); empty = check all blocks
# - unicodeReplacements: object or [char, replacement] array; built-in defaults (arrows, quotes, <=>=*) if omitted
ascii-only:
allowedPathPatternsUnicode:
# - "**/README.md"
allowedPathPatternsEmoji:
- ".markdownlint-rules/README.md"
- "markdownlint-rules/README.md"
# allowedUnicode:
# - "ń" # additions on top of default (fixtures e.g. positive.md)
# allowedUnicodeReplaceDefault: false # true = use only allowedUnicode list, no default set
allowedEmoji:
- "✅"
- "❌"
- "📊"
- "⚠️"

# heading-title-case: enforce title case for headings; words in backticks ignored; configurable lowercase words
# document-length: disallow documents longer than maximum lines (default 1500)
# - maximum: positive integer; default 1500
document-length:
maximum: 1500

# heading-title-case: AP-style headline capitalization; words in backticks ignored
# heading-title-case:
# lowercaseWords: ["a", "an", "the", "vs", ...] # optional override; default list used if omitted
# lowercaseWords: ["through", ...] # optional; extends default list (add words)
# lowercaseWordsReplaceDefault: true # optional; true = use only lowercaseWords list, no default set

# allow-custom-anchors: anchor id patterns and optional placement per pattern
# - allowedIdPatterns: array of regex strings or { pattern, placement? }; placement is per anchor regex
# - strictPlacement: if true (default), enforce placement when placement is set for that pattern
# allow-custom-anchors: require anchor ids to match patterns; optional placement (line/heading) per pattern
# - allowedIdPatterns: list of regex strings or { pattern, placement? }; placement applies per pattern
# - strictPlacement: true (default) = enforce placement when a pattern has placement set
allow-custom-anchors:
allowedIdPatterns:
- pattern: "^spec-[a-z0-9-]+$"
Expand Down
13 changes: 7 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"markdownlint.customRules": [
"./.markdownlint-rules/allow-custom-anchors.js",
"./.markdownlint-rules/ascii-only.js",
"./.markdownlint-rules/heading-numbering.js",
"./.markdownlint-rules/heading-title-case.js",
"./.markdownlint-rules/no-duplicate-headings-normalized.js",
"./.markdownlint-rules/no-heading-like-lines.js"
"./markdownlint-rules/allow-custom-anchors.js",
"./markdownlint-rules/ascii-only.js",
"./markdownlint-rules/heading-numbering.js",
"./markdownlint-rules/heading-title-case.js",
"./markdownlint-rules/no-duplicate-headings-normalized.js",
"./markdownlint-rules/no-heading-like-lines.js",
"./markdownlint-rules/document-length.js"
]
}
Loading