github vale-cli/vale v3.19.0

2 hours ago

MDX: JSX children are now linted

Vale now reads a JSX element's children as the Markdown they are — matching MDX's own grammar, where only tags, attributes, and {...} expressions are JavaScript. The prose inside wrapping components like <Steps>, <Tabs>, or <Aside> is linted at its exact source position, as is the text of inline elements (<abbr>HTML</abbr> — "HTML" is read as part of its sentence). For documentation built on component-heavy frameworks like Astro Starlight, this can mean a quarter of your prose is now covered.

Children carry the element's name as a class scope, the same way MyST and Quarto directives work — so a rule can target one component's content (scope: text.class.Aside), and a component whose content shouldn't be linted can be excluded by name:

IgnoredClasses = RawOutput

That's also the escape hatch if you preferred the old skip-everything behavior. Attribute values, expressions, self-closing elements, and elements opened and closed on a single standalone line are still treated as code.

Changelog

  • 405a7da fix: strip a comment's delimiters, not its prose's (#1151)
  • 7766415 feat(code): add Elixir comment and doc-attribute extraction (#1151)
  • 055db43 feat: let a sequence token ask for repeated occurrences (#899)
  • 9ba5dea feat: lint a JSX element's children as the Markdown they are (#1155)
  • 8702043 fix: lint a block title as written, without its generated label (#1152)
  • d0e65f4 docs: update contributing for native MDX and Typst

Don't miss a new vale release

NewReleases is sending notifications on new releases.