React components in MDX files are not ignored
See original GitHub issueInfo
Kind of Issue
- runtime - command-line tools
Which Tool or library
- cspell – the command-line spelling tool
Which Version
Version: the one bundled in the latest scode-spell-checker extension.
Issue with supporting library?
- No
OS:
- Macos
version:
Latest Monterey
Bug Description
Describe the bug
The documentation seems to imply the MDX format is supported, but cspell
seems to spell-check React components, even though it ignores HTML elements. Both are programmatic structures, not natural language.
My rationale here is that React components and HTML elements can and do co-exist inside the same MDX or JSX file, yet HTML elements are never spell-checked. I understand you mileage may vary here. An option to ignore React components would be great too. Thank you.
To Reproduce
Steps to reproduce the behavior:
I created a .MDX file with the contents shown in the screenshot below. Pretty much one line of text and a random React component.
Expected behavior
React components should/could be ignored.
Screenshots
Thank you for your time
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Top GitHub Comments
@sebastienbarre,
Work is currently underway to support parsers as well as an ESLint plugin. The first step will most likely be done as an ESLint plugin, since ESLint will be doing the parsing and then sending the elements of the AST to the spell checker. At a later stage, a more generic solution will be supported.
For your immediate need, you can use directives in the file to ignore things like
plaiceholder
.Just include it as a comment :
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.