eslint-mdx icon indicating copy to clipboard operation
eslint-mdx copied to clipboard

`no-unused-expressions` reported on `{' '}`

Open karlhorky opened this issue 1 year ago • 2 comments
trafficstars

Initial checklist

Affected packages and versions

[email protected]

Link to runnable example

No response

Steps to reproduce

  1. Set up [email protected] using the recommended config
  2. Lint the following file

index.mdx

Before{' '}after

Observe that a problem is reported on the {' '}:

Screenshot 2024-08-07 at 18 28 31

Expected an assignment or function call and instead saw an expression. eslint no-unused-expressions

Possibly related

  • https://github.com/mdx-js/eslint-mdx/issues/384

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:

Screenshot 2024-08-07 at 18 28 47

Actual behavior

Problem is reported, as above

Runtime

No response

Package manager

No response

OS

macOS

Build and bundle tools

No response

karlhorky avatar Aug 07 '24 16:08 karlhorky