Skip to content

Add reactLibrary setting #2904

Open
Open
@cherryblossom000

Description

@cherryblossom000

Add a reactLibrary setting for the name of the React library (defaults to 'react'). This would be helpful for Preact users.

Currently, the jsx-fragments rule (set to syntax) doesn't warn about this:

import {Fragment} from 'preact'

const foo = <Fragment>foo</Fragment>

Checking for the configured reactLibrary setting instead of the hard-coded 'react' would make this rule (and possibly others, I haven't really looked into this plugin that much) more flexible.

Metadata

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