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

[Bug]: allowExpression in react/jsx-no-useless-fragment #3710

Open
2 tasks done
YuriyDyachkov opened this issue Mar 14, 2024 · 1 comment
Open
2 tasks done

[Bug]: allowExpression in react/jsx-no-useless-fragment #3710

YuriyDyachkov opened this issue Mar 14, 2024 · 1 comment
Labels

Comments

@YuriyDyachkov
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and my issue is unique
  • My issue appears in the command-line and not only in the text editor

Description Overview

image

I added the allowExpression: true option to my config, but the empty fragment still shows the error.

Expected Behavior

There shouldn't be any mistakes.
What did I miss?

eslint-plugin-react version

7.32.2

eslint version

8.15.0

node version

16

@ljharb
Copy link
Member

ljharb commented Mar 14, 2024

“nothing” isn’t an expression.

Why return an empty fragment instead of undefined or null?

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

No branches or pull requests

2 participants