Open vb opened 1 year ago
Type checking isn't done by ESLint. MDX type checking is available in MDX analyzer instead. (Though it's still early stage)
https://github.com/ota-meshi/typescript-eslint-parser-for-extra-files
This package maybe help, I'll do some research recently.
Would also love if full type checking was in the toolchain somewhere - checking for the components provided through MDXProvider
, as also mentioned in the mdx-analyzer discussion:
Our use case: checking whether a value of a particular slug is valid and failing CI if invalid (currently set to a union of string literals in TS):
- 🎥 slides: <LectureSlideDeck slug="js-fundamentals" />
Initial checklist
Problem
I want to have a system where the author can't render a React component in mdx with the wrong props.
Example
Solution
I'd get an eslint error when I try to render a React component in mdx with bad props
Alternatives
I guess this is done together with plugin:@typescript-eslint?