Skip to content

react/jsx-no-literals rule shows warning with template strings #1511

Closed
@medialwerk

Description

Hello,

i'm using eslint@4.10.0 and eslint-plugin-react@7.4.0. The linter shows a warning if a join a string with "template strings", but not if I join it with the + operator:

<div className={'test' + name} />
// No warning
<div className={`test ${name}`} />
// Strings not allowed in JSX files (react/jsx-no-literals)

Is this a known issue?

Best regards

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions