Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error: Expected value to be truthy #462

Closed
4 tasks done
vb opened this issue May 4, 2023 · 4 comments
Closed
4 tasks done

Parsing error: Expected value to be truthy #462

vb opened this issue May 4, 2023 · 4 comments

Comments

@vb
Copy link

vb commented May 4, 2023

Initial checklist

Affected packages and versions

eslint-plugin-mdx 2.1.0

Link to runnable example

https://github.com/vb/eslint-plugin-mdx-tabs-spaces

Steps to reproduce

  • Clone https://github.com/vb/eslint-plugin-mdx-tabs-spaces
  • npm install
  • npm run lint

Expected behavior

Both mdx files should lint without errors

Actual behavior

eslint throws error on file spaces.mdx

spaces.mdx
  0:0  error  Parsing error: Expected value to be truthy

✖ 1 problem (1 error, 0 warnings)

Runtime

Node v18

Package manager

npm v9

OS

macOS

Build and bundle tools

No response

@vb
Copy link
Author

vb commented May 4, 2023

Some additional info:
The new version 2.1.0 (and older versions afaik) throws the error Parsing error: Expected value to be truthy when using spaces instead of tabs when passing an object as prop in JSX.

<button 
  style={{
    background: 'red',
    border: '1px solid red',
  }}
>
  Hello
</button>

Minimal reproducible example is available here https://github.com/vb/eslint-plugin-mdx-tabs-spaces

@JounQin
Copy link
Member

JounQin commented May 4, 2023

duplicate of #435

@JounQin JounQin closed this as not planned Won't fix, can't repro, duplicate, stale May 4, 2023
@JounQin
Copy link
Member

JounQin commented May 4, 2023

And I believe you mixed up the two styles 😂

https://github.com/vb/eslint-plugin-mdx-tabs-spaces/blob/main/spaces.mdx?plain=1

This file is using tabs and resulting the error.

@vb
Copy link
Author

vb commented May 4, 2023

You're right and sorry for the duplicate! I did not see the other ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants