fix(lint): restore the glob-scoping rule and warn about the MDX invocation kill
vale-config deleted "settings in a glob section only apply to files matching that glob" — the single most common Vale misconfiguration. Nothing in either lint skill told an agent that BasedOnStyles under `[*.md]` governs `.md` only; the nearest survivor was a parenthetical in a reference file the skill opens only for the full field listing. Restored to the always-loaded body, at the point of use. vale-config also never mentioned `[formats]` or MDX at all, leaving the whole decision in that same reference file. Verified against Vale 3.15.2: an unmapped `.mdx` covered by one of your globs is `E100 [lintMDX]`, exit 2, and every other file in that invocation produces no output whatsoever. Because the failure is invocation-wide rather than per-file, it belongs in the Gotchas. The crash requires a glob that actually covers `.mdx` — under `[*.md]` the file is skipped and nothing fails — so the Gotcha states that condition rather than the broader claim that any `.mdx` in the tree kills the run. The mapping-versus-mdx2vast attribution disagreed across the two skills: vale-run said `[formats] mdx = md` is "what vale-config recommends" while vale-config presented it as a bare either/or. Fixed on the source side by having vale-config actually recommend it and say why, which makes vale-run's existing sentence true with no edit to vale-run. Refs: #117
This commit is contained in:
@@ -25,7 +25,7 @@ Map an unrecognized extension onto a supported one so Vale lints it with the rig
|
||||
mdx = md
|
||||
```
|
||||
|
||||
`mdx` is the case that matters, because Vale 3.15.2 has no built-in MDX support. The mapping above is not cosmetic: it is what lets `.mdx` files lint with nothing else installed. Leave it out and Vale takes the native MDX path, which shells out to an external `mdx2vast` binary — absent from `PATH`, the run dies with `E100 [lintMDX] Runtime error / mdx2vast not found`, exit 2, and every other file in the same invocation goes unlinted too. Install it with `npm install -g mdx2vast` or take the mapping.
|
||||
`mdx` is the case that matters, because Vale 3.15.2 has no built-in MDX support. The mapping above is not cosmetic: it is what lets `.mdx` files lint with nothing else installed. Leave it out and Vale takes the native MDX path, which shells out to an external `mdx2vast` binary — absent from `PATH`, the run dies with `E100 [lintMDX] Runtime error / mdx2vast not found`, exit 2, and every other file in the same invocation goes unlinted too. Take the mapping: it is this skill's recommended default, because it needs nothing installed, and it is the branch `vale-run` assumes when it documents inline suppressions. Install `mdx2vast` (`npm install -g mdx2vast`) only when something else in the toolchain already needs the native MDX parser.
|
||||
|
||||
The choice also decides the inline-suppression syntax, and it is inverted between the two: mapped to `md`, `.mdx` takes Markdown's `<!-- vale off -->`; native, it takes `{/* vale off */}`. `vale-run`'s `references/troubleshooting.md` carries the verified matrix.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user