Open karlhorky opened 1 month ago
@karlhorky the expression does indeed look like it isn't needed, it could be a space. Is you concern with the word "unused"? Do you see this more as being a different rule, like "no-useless-expression"?
My thought here is that this isn't actually invalid syntax - it's a valid style in case a user would want to use it (eg. for our projects, we would like to use a space in JSX expression interpolation to avoid formatting problems with Prettier, rather than taking the route of disabling Prettier)
Stylistically, I can see how this is arguably an interesting rule for some users, but I would suggest that it doesn't absolutely need to be default
Initial checklist
Affected packages and versions
eslint-plugin-mdx@3.1.5
Link to runnable example
No response
Steps to reproduce
eslint-plugin-mdx@3.1.5
using the recommended configindex.mdx
Observe that a problem is reported on the
{' '}
:Possibly related
Expected behavior
No problem is reported
I'm assuming this should be accepted syntax because the MDX Playground shows that the
{' '}
will result in a space:Actual behavior
Problem is reported, as above
Runtime
No response
Package manager
No response
OS
macOS
Build and bundle tools
No response