mirror of
https://github.com/airbnb/javascript.git
synced 2026-04-25 03:00:19 -04:00
[eslint config] [patch] disable no-did-mount-set-state, since it’s necessary for server-rendering.
Fixes #684.
This commit is contained in:
3
packages/eslint-config-airbnb/rules/react.js
vendored
3
packages/eslint-config-airbnb/rules/react.js
vendored
@@ -142,7 +142,8 @@ module.exports = {
|
||||
|
||||
// Prevent usage of setState in componentDidMount
|
||||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md
|
||||
'react/no-did-mount-set-state': 'error',
|
||||
// this is necessary for server-rendering
|
||||
'react/no-did-mount-set-state': 'off',
|
||||
|
||||
// Prevent usage of setState in componentDidUpdate
|
||||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md
|
||||
|
||||
Reference in New Issue
Block a user