ESLint-plugin-React-SSR
React specific linting rules for ESLint
Installation
Install ESLint either locally or globally.
$ npm install eslint --save-dev
If you installed ESLint
globally, you have to install React plugin globally too. Otherwise, install it locally.
$ npm install eslint-plugin-react-ssr --save-dev
Configuration
Add plugins
section and specify ESLint-plugin-React as a plugin.
List of supported rules
- react/no-constructor-dom: Prevent usage of
window/document
inconstructor
- react/no-will-mount-dom: Prevent usage of
window/document
incomponentWillMount
Shareable configurations
All
This plugin also exports an all
configuration that includes every available rule.
This pairs well with the eslint:all
rule.
Note: These configurations will import eslint-plugin-react-ssr
and enable JSX in parser options.
License
ESLint-plugin-React-SSR is licensed under the MIT License.