From c12779cde59acbe1c8ee5341cd897bf4a6dd948b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Pe=CC=81rez?= Date: Sun, 11 Jan 2026 23:22:13 +0000 Subject: [PATCH] chore: fix ci md lint --- .markdownlint-cli2.jsonc | 114 ++++++++++++++++----------------------- .pre-commit-config.yaml | 4 +- 2 files changed, 47 insertions(+), 71 deletions(-) diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc index 5f9de62..92b281c 100644 --- a/.markdownlint-cli2.jsonc +++ b/.markdownlint-cli2.jsonc @@ -1,94 +1,70 @@ -// Markdownlint-cli2 Configuration for SecretumVault -// Documentation quality enforcement for security-focused project +// Markdownlint-cli2 Configuration for TypeDialog +// Documentation quality enforcement with relaxed technical writing rules // See: https://github.com/igorshubovych/markdownlint-cli2 { "config": { "default": true, - // Headings - enforce proper hierarchy - "MD001": false, // heading-increment (relaxed - allow flexibility) - "MD026": { "punctuation": ".,;:!?" }, // heading-punctuation + // Headings - relaxed for technical docs + "MD001": false, // heading-increment (allow flexible hierarchy) + "MD003": false, // heading-style (mixed styles ok) + "MD022": true, // blanks-around-headings (enforce for clarity) + "MD023": false, // heading-start-line (allow indented headings) + "MD024": false, // no-duplicate-heading (allow duplicates) + "MD025": false, // single-h1 (allow multiple H1s) + "MD026": { "punctuation": ".,;:!?" }, // heading-punctuation - // Lists - enforce consistency - "MD004": { "style": "consistent" }, // ul-style (consistent list markers) - "MD005": false, // inconsistent-indentation (relaxed) - "MD007": { "indent": 2 }, // ul-indent - "MD029": false, // ol-prefix (allow flexible list numbering) - "MD030": { "ul_single": 1, "ol_single": 1, "ul_multi": 1, "ol_multi": 1 }, + // Lists - relaxed for flexibility + "MD004": { "style": "consistent" }, // ul-style + "MD005": false, // inconsistent-indentation (too strict) + "MD007": false, // ul-indent (allow flexible indentation) + "MD029": { "style": "1/1/1" }, // ol-prefix (allow lazy numbering) + "MD030": false, // list-marker-space (too strict) + "MD032": true, // blanks-around-lists (enforce for clarity) - // Code blocks - fenced only - "MD046": { "style": "fenced" }, // code-block-style - // NOTE: MD040 only checks for missing language on opening fence. - // It does NOT catch malformed closing fences with language specifiers (e.g., ```plaintext). - // Custom pre-commit hook required to enforce proper closing fence syntax. + // Code blocks - enforce language but relax spacing + "MD031": true, // blanks-around-fences (enforce for clarity) + "MD040": true, // fenced-code-language (require language) + "MD046": { "style": "fenced" }, // code-block-style + "MD049": false, // emphasis-style (allow flexibility) + "MD050": false, // strong-style (allow flexibility) - // Formatting - strict whitespace - "MD009": true, // no-hard-tabs - "MD010": true, // hard-tabs + // Formatting - essential only + "MD009": true, // no-trailing-spaces + "MD010": true, // no-hard-tabs "MD011": true, // reversed-link-syntax + "MD012": false, // no-multiple-blanks (allow spacing) + "MD014": false, // commands-show-output (allow $ in examples) "MD018": true, // no-missing-space-atx "MD019": true, // no-multiple-space-atx - "MD020": true, // no-missing-space-closed-atx - "MD021": true, // no-multiple-space-closed-atx - "MD023": true, // heading-starts-line - "MD027": true, // no-multiple-spaces-blockquote "MD037": true, // no-space-in-emphasis - "MD039": true, // no-space-in-links - - // Trailing content - "MD012": false, // no-multiple-blanks (relaxed - allow formatting space) - "MD024": false, // no-duplicate-heading (too strict for docs) - "MD028": false, // no-blanks-blockquote (relaxed) - "MD031": false, // blanks-around-fences (too strict for technical docs) + "MD038": false, // no-space-in-code (too strict) "MD047": true, // single-trailing-newline // Links and references - "MD034": true, // no-bare-urls (links must be formatted) - "MD040": true, // fenced-code-language (code blocks need language) + "MD034": true, // no-bare-urls "MD042": true, // no-empty-links - "MD051": false, // link-fragments (often false positives for valid internal links) + "MD051": false, // link-fragments (false positives with valid anchors) + "MD052": false, // reference-links-images (too strict) + "MD053": false, // link-image-reference-definitions (too strict) - // HTML - allow for documentation formatting and images - "MD033": { "allowed_elements": ["br", "hr", "details", "summary", "p", "img", "div"] }, + // HTML and inline elements + "MD033": false, // no-inline-html (allow HTML in docs) + "MD036": false, // no-emphasis-as-heading + "MD041": false, // first-line-heading (allow files without H1 at start) - // Line length - relaxed for technical documentation - "MD013": { - "line_length": 150, - "heading_line_length": 150, - "code_block_line_length": 150, - "code_blocks": true, - "tables": true, - "headers": true, - "headers_line_length": 150, - "strict": false, - "stern": false - }, + // Line length - disabled for technical content + "MD013": false, - // Images - "MD045": true, // image-alt-text - - // Disable rules that conflict with relaxed style - "MD003": false, // consistent-indentation - "MD041": false, // first-line-heading - "MD025": false, // single-h1 / multiple-top-level-headings - "MD022": false, // blanks-around-headings (flexible spacing) - "MD032": false, // blanks-around-lists (flexible spacing) - "MD035": false, // hr-style (consistent) - "MD036": false, // no-emphasis-as-heading - "MD044": false, // proper-names - "MD060": true // table-column-style (enforce proper table formatting) + // Tables - relaxed + "MD056": false, // table-column-count (allow flexible columns) + "MD058": false, // table-pipe-style (too strict) + "MD059": false, // table-row-style (too strict) + "MD060": false // table-column-style (too strict) }, - // Documentation patterns - "globs": [ - "*.md", - "docs/**/*.md", - "!docs/node_modules/**", - "!docs/build/**" - ], - - // Ignore build artifacts, external content, and operational directories + // Ignore patterns "ignores": [ "node_modules/**", "target/**", diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea75002..a0c6b14 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -96,7 +96,7 @@ repos: entry: markdownlint-cli2 language: system types: [markdown] - stages: [commit] + stages: [pre-commit] - id: check-malformed-fences name: Check malformed closing fences @@ -104,7 +104,7 @@ repos: language: system types: [markdown] pass_filenames: false - stages: [commit] + stages: [pre-commit] # ============================================================================ # General Pre-commit Hooks