--- source_keys: - context7-websites-vale-sh - house-vale-3-15-2-repro --- # Vale troubleshooting reference ## Why a rule isn't applying `vale ls-config` prints the fully-resolved, currently active configuration as JSON. Check that before rereading `.vale.ini` — what is written in the config file is not necessarily what is active, and the resolved output is the fastest way to see which config files, styles and `StylesPath` directories a run actually loaded. It stops at styles. It does not enumerate rules, and neither does any other Vale 3.15.2 subcommand — `ls-config`, `ls-dirs`, `ls-vars` and `ls-metrics` were each checked and none names the rule. Against a config whose custom rule was demonstrably firing on the target file, `ls-config` reported `"SBaseStyles": {"*.md": ["MyStyle"]}` and the two `StylesPath` search paths, but `"Checks": null`, `"SChecks": {"*.md": {}}` and `"RuleToLevel": {}` — the firing rule's own name appeared nowhere in the output. So `ls-config` answers "is this style loaded, and from where", not "is this rule live". For the latter, run Vale over a small fixture that should trigger the rule and see whether it alerts. ## Inline suppression syntax by format ### Prerequisite: `.mdx` needs a decision before it lints at all Vale 3.15.2 has no built-in MDX support. If `.vale.ini` does **not** map the extension, Vale takes the native MDX path and shells out to an external `mdx2vast` binary. Without it on `PATH` the run dies before linting anything: ``` $ vale . # doc.md and doc.mdx both present, no [formats] mapping E100 [lintMDX] Runtime error mdx2vast not found Execution stopped with code 1. $ echo $? 2 ``` That is the whole invocation, not just the `.mdx` file — the `.md` alongside it produced no output either. Fix it one of two ways, and the choice is not cosmetic because it also decides the suppression syntax: | `.vale.ini` | Prerequisite | Parser | Suppression form that works | |---|---|---|---| | `[formats]` maps `mdx = md` (what `vale-config` recommends) | none | Markdown | `` | | no `mdx` mapping (native MDX) | `npm install -g mdx2vast` | MDX | `{/* vale off */}` | Key the markup to that config row, never to the file extension. Asserted against Vale 3.15.2 by `tests/test-vale-3-15-2-behaviours.sh` (slug `house-vale-3-15-2-repro`) for the mapped column; the native-MDX column was observed with `mdx2vast` installed and is not covered by that test (it needs the binary): | File | Mapped `mdx = md` | Native MDX (`mdx2vast` installed) | |---|---|---| | no suppression (control) | alert, exit 1 | alert, exit 1 | | `` | suppressed, exit 0 | `E100 ... failed to parse MDX: Unexpected character` `` `!` ``, exit 2 | | `{/* vale off */}` | **not suppressed**, exit 1 | suppressed, exit 0 | Under the mapping the JSX comment is worse than inert: it is linted as prose, so `{/* vale Vale.Repetition = NO */}` produced three alerts where the un-suppressed file produced one — its own markup tripped the rule twice more. Markdown, and `.mdx` mapped onto it — HTML comments: ```markdown This text will be ignored. ``` Native MDX only (no `[formats]` mapping, `mdx2vast` on `PATH`): ```mdx {/* vale off */} This text will be ignored. {/* vale on */} ``` Org mode: ```org # vale off This text will be ignored. # vale on ``` ## Disabling a specific rule for specific matches Targets one rule and specific known-exception strings, then re-enables — the preferred fix for a recurring false positive on a specific term, since it keeps the rule active everywhere else: Markdown: ```markdown This is some text ACT test ``` Native MDX only — under `[formats] mdx = md` an `.mdx` file takes the Markdown form above, and this one silences nothing: ```mdx {/* vale Style.Redundancy["ACT test","OTHER"] = NO */} This is some text ACT test {/* vale Style.Redundancy["ACT test","OTHER"] = YES */} ``` ## Ignoring words in spell check The `spelling` check accepts an `ignore` list of external plain-text files, so project-specific terms don't need touching the dictionary: ```yaml extends: spelling message: "Did you really mean '%s'?" level: error ignore: - ignore1.txt - ignore2.txt ``` **Where the file goes, and why a wrong answer is invisible.** Each entry resolves against the `StylesPath` root, or against the working directory `vale` is invoked from. It does **not** resolve against the rule file's own directory — which is the natural reading of the YAML above, since the path sits inside the rule, and it is wrong. Asserted against Vale 3.15.2 by the same test across four fresh trees, each with the same rule and the same unknown word: | Where `ignore1.txt` was placed | Result | |---|---| | `/ignore1.txt` | word ignored, exit 0 | | `./ignore1.txt` in the directory `vale` runs from | word ignored, exit 0 | | `/