Skip to content

[jsx-curly-brace-presence] template literals contains just expressions #3537

Closed
@taozhou-glean

Description

@taozhou-glean

we enabled jsx-curly-brace-presence, but I am seeing patterns in some code like following:

<Comp label={`${componentLabel}`} />

// or

<Comp>
{`${someText}`}
</Comp>

which would be same as:

<Comp label={componentLabel} />

// or

<Comp>
{someText}
</Comp>

and this seems to be an ideal case to be caught by jsx-curly-brace-presence ;)

=> Found "eslint-plugin-react@7.32.2"
=> Found "eslint@8.34.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions