1.0.3 • Published 8 years ago
eslint-plugin-react-ssr v1.0.3
ESLint-plugin-React-SSR
React specific linting rules for ESLint
Installation
Install ESLint either locally or globally.
$ npm install eslint --save-devIf you installed ESLint globally, you have to install React plugin globally too. Otherwise, install it locally.
$ npm install eslint-plugin-react-ssr --save-devConfiguration
Add plugins section and specify ESLint-plugin-React as a plugin.
{
"plugins": [
"react-ssr"
]
}List of supported rules
- react/no-constructor-dom: Prevent usage of
window/documentinconstructor - react/no-will-mount-dom: Prevent usage of
window/documentincomponentWillMount
Shareable configurations
All
This plugin also exports an all configuration that includes every available rule.
This pairs well with the eslint:all rule.
{
"plugins": [
"react-ssr"
],
"extends": ["eslint:all", "plugin:react-ssr/all"]
}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.