Skip to content

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

@YuriyDyachkov

Description

@YuriyDyachkov

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

Activity

ljharb

ljharb commented on Mar 14, 2024

@ljharb
Member

“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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ljharb@YuriyDyachkov

        Issue actions

          [Bug]: allowExpression in react/jsx-no-useless-fragment · Issue #3710 · jsx-eslint/eslint-plugin-react