diff --git a/.yamllint.yaml b/.yamllint.yaml index dc117fc..61cc7b6 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -24,6 +24,19 @@ ignore: | **/package-lock.json **/yarn.lock + # Rails fixtures are ERB TEMPLATES, not YAML documents. campfire's + # test/fixtures/users.yml opens with + # <% password_digest = BCrypt::Password.create("secret123456") %> + # and only becomes valid YAML after Rails renders it, so yamllint + # reports a hard syntax error and always will. The ActionText fixtures + # alongside them are HTML blobs that tests assert on byte-for-byte, so + # rewrapping their long lines would be a test change, not a formatting + # change. Seven files in that repo are ERB-templated YAML; the others + # only parse because their ERB happens to sit inside quoted scalars, + # which is luck rather than correctness. + test/fixtures/ + **/test/fixtures/ + rules: # 140-char limit. Workflow files have legitimately long shell URLs # (the actionlint download script, action references) and issue- diff --git a/ADOPTING-LINT.md b/ADOPTING-LINT.md index 9626c94..4c8b92a 100644 --- a/ADOPTING-LINT.md +++ b/ADOPTING-LINT.md @@ -164,6 +164,18 @@ fine, so rewrite an affected comment as a run of single-line `{/* ... */}` comments: same text, valid MDX, prettier leaves it alone. Always diff an `.mdx` file after `--write`. +**A file with a `.md` extension that is not Markdown will be silently +corrupted.** `mzizi-registry` ships +`components/registry/n8-assurance/accessibility-audit.md`, which is +actually SQL - it is installed into consumers as documentation. Its +`/* ... */` banner parses as Markdown emphasis, so MD037 fires and +`prettier --write` rewrites `/*` to `/_` and `*/` to `_/`. The autofix +does not fail the gate: it rewrites a shipped artifact into invalid SQL +and then passes green. The fix is to wrap the body in a fenced code +block, which leaves the content byte-for-byte unchanged, satisfies both +tools, and makes the installed document render as code. Before running +`--fix` over a repo, look at what its `.md` files actually contain. + **A `.md` file containing MDX comments cannot satisfy both toolchains, and `--fix` will corrupt it.** Mintlify starters leave `{/* ... */}` in a file named `AGENTS.md`. Mintlify parses that file as MDX, where an HTML