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
13 changes: 13 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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-
Expand Down
12 changes: 12 additions & 0 deletions ADOPTING-LINT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down