Enable react hooks linting
Summary: Enabled linting rules that help to signal making errors with effect dependencies and such. Fixed all errors, left any warnings generated by the hooks untouched Reviewed By: nikoant Differential Revision: D21721497 fbshipit-source-id: 9548453443fa7b663dc4d4289132f388c6697283
This commit is contained in:
committed by
Facebook GitHub Bot
parent
67b53aea98
commit
54162d480c
@@ -46,10 +46,13 @@ module.exports = {
|
||||
'@typescript-eslint',
|
||||
'import',
|
||||
'node',
|
||||
'react-hooks',
|
||||
],
|
||||
rules: {
|
||||
// disable rules from eslint-config-fbjs
|
||||
'react/react-in-jsx-scope': 0, // not needed with our metro implementation
|
||||
'react-hooks/rules-of-hooks': 'error',
|
||||
'react-hooks/exhaustive-deps': 'warn',
|
||||
'no-new': 0, // new keyword needed e.g. new Notification
|
||||
'no-catch-shadow': 0, // only relevant for IE8 and below
|
||||
'no-bitwise': 0, // bitwise operations needed in some places
|
||||
|
||||
Reference in New Issue
Block a user