Skip to content

Handle new JSX transform #2834

Closed
Closed
@mrmckeb

Description

@mrmckeb

We've added support for the new JSX transform into Create React App (facebook/create-react-app#9645, facebook/create-react-app#9788), and we've been discussing how best to support this in our ESLint config.

I'm not sure if this is a good idea, and wanted some thoughts. I wondered if we should update jsx-uses-react to warn when using a React version that ships with the new transform, and do one of the following:

  • Add an autofix (remove all React imports).
  • Recommend running the codemod.

For now, we're:

  • Auto-detecting support for the new transform (see base.js#L14-L21).
  • Updating rules based on that detection, leaving jsx-uses-react on to avoid confusion (see base.js#L52-L58).

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