Enable react/no-unstable-nested-components rule
Summary: Dynamic nested components can cause tricky performance issues in React, as the reconciler will not be able to reuse the previously mounted component tree. Changelog: [General] [Added] Added linter warning config for unstable nested components Reviewed By: motiz88 Differential Revision: D33767283 fbshipit-source-id: 869ece99dc63cc3a150bae882d26df8541e8db59
This commit is contained in:
Родитель
3d1d4ee457
Коммит
988fefc44d
|
@ -300,6 +300,7 @@ module.exports = {
|
|||
'react/no-multi-comp': 0,
|
||||
'react/no-string-refs': 1,
|
||||
'react/no-unknown-property': 0,
|
||||
'react/no-unstable-nested-components': 1,
|
||||
'react/prop-types': 0,
|
||||
'react/react-in-jsx-scope': 1,
|
||||
'react/self-closing-comp': 1,
|
||||
|
@ -307,8 +308,8 @@ module.exports = {
|
|||
|
||||
// React-Hooks Plugin
|
||||
// The following rules are made available via `eslint-plugin-react-hooks`
|
||||
'react-hooks/rules-of-hooks': 'error',
|
||||
'react-hooks/exhaustive-deps': 'error',
|
||||
'react-hooks/rules-of-hooks': 2,
|
||||
'react-hooks/exhaustive-deps': 2,
|
||||
|
||||
// React-Native Plugin
|
||||
// The following rules are made available via `eslint-plugin-react-native`
|
||||
|
|
Загрузка…
Ссылка в новой задаче