Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] jsx-uses-react: mark fragment variables as used #2775

Merged
merged 1 commit into from Aug 29, 2020

Commits on Aug 28, 2020

  1. [Fix] jsx-uses-react: mark fragment variables as used

    This allows to use the following syntax:
    
    ```jsx
    import { createElement, Fragment } from 'react';
    
    function Component {
      return <></>;
    }
    ```
    
    Or more common in Preact:
    
    ```jsx
    import { Fragment, h } from 'preact';
    
    function Component {
      return <></>;
    }
    ```
    
    The `react.fragment` setting already existed for other rules, but it was
    undocumented.
    remcohaszing authored and ljharb committed Aug 28, 2020
    Copy the full SHA
    911f66e View commit details
    Browse the repository at this point in the history