Install ESLint either locally or globally. (Note that locally, per project, is strongly preferred). If you installed ESLint globally, you have to install React plugin globally too. Otherwise, install it locally. Use our preset to get reasonable defaults. If you are using the new JSX transform from React 17, extend react/jsx-runtime in your eslint config to disable the relevant rules. You should also specify settings that will be shared across all the plugin rules. If you do not use a preset you will need to specify individual rules and add extra configuration. This plugin exports a recommended configuration that enforces React good practices. This plugin also exports an all configuration that includes every available rule. This pairs well with the eslint:all rule. These configurations will import eslint-plugin-react and enable JSX in parser options.
Features
- Install ESLint either locally or globally
- Use our preset to get reasonable defaults
- Specify settings that will be shared across all the plugin rules
- ESLint-plugin-React is licensed under the MIT License
- Add "react" to the plugins section
- Enable the rules that you would like to use