When selecting MDX in the config generator (https://vale.sh/generator), the generated .vale.ini adds MDX to the Packages list but doesn't update the configuration to actually lint .mdx files. This leads to a confusing experience where users think MDX support is configured but Vale doesn't find any issues.
Current behavior:
Selecting MDX generates:
Packages = Google, MDX
[*.{md}]
BasedOnStyles = Vale, Google
Issues:
- The glob pattern
[*.{md}] doesn't match .mdx files, so they aren't linted
vale sync succeeds, but running vale on .mdx files fails at runtime with mdx2vast not found because Vale's native MDX parser requires an external dependency
- The
mdx2vast requirement is documented at https://vale.sh/docs/formats/mdx, but:
- The config generator doesn't mention it when MDX is selected
- vale sync doesn't warn about the missing dependency
- Users only discover the issue when vale fails at runtime
Suggested improvements:
- When MDX is selected, update the glob pattern to include .mdx files: [*.{md,mdx}]
- Either:
- Add a note in the config generator when MDX is selected explaining that npm install -g mdx2vast is required, OR
- Add a format mapping to treat MDX as Markdown by default. This bypasses the native MDX parser and treats MDX files as regular Markdown, which works for most use cases without external dependencies.
When selecting MDX in the config generator (https://vale.sh/generator), the generated .vale.ini adds MDX to the Packages list but doesn't update the configuration to actually lint .mdx files. This leads to a confusing experience where users think MDX support is configured but Vale doesn't find any issues.
Current behavior:
Selecting MDX generates:
Issues:
[*.{md}]doesn't match .mdx files, so they aren't lintedvale syncsucceeds, but running vale on .mdx files fails at runtime with mdx2vast not found because Vale's native MDX parser requires an external dependencymdx2vast requirementis documented at https://vale.sh/docs/formats/mdx, but:- The config generator doesn't mention it when MDX is selected
- vale sync doesn't warn about the missing dependency
- Users only discover the issue when vale fails at runtime
Suggested improvements:
- Add a note in the config generator when MDX is selected explaining that
npm install -g mdx2vastis required, OR- Add a format mapping to treat MDX as Markdown by default. This bypasses the native MDX parser and treats MDX files as regular Markdown, which works for most use cases without external dependencies.