make lint error on missing keys

Summary: When exploratory testing Flipper, I generally see quite some React key warnings. So it seems that plugin devs often miss them. This diff will configure linting more aggressively to address that (it's not fool proof, but will find the most common cases).

Reviewed By: nikoant

Differential Revision: D26722707

fbshipit-source-id: e0d2b56de2422e1147f52c8e9150d00c7ee64bd2
This commit is contained in:
Michel Weststrate
2021-03-02 01:15:27 -08:00
committed by Facebook GitHub Bot
parent 4d8be35d1a
commit afa2c6322a
7 changed files with 10 additions and 8 deletions

View File

@@ -51,6 +51,7 @@ module.exports = {
'react/react-in-jsx-scope': 0, // not needed with our metro implementation
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react/jsx-key': 'error',
'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