diff --git a/desktop/.eslintrc.js b/desktop/.eslintrc.js index f4cebb4ed..efc6b734f 100644 --- a/desktop/.eslintrc.js +++ b/desktop/.eslintrc.js @@ -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 diff --git a/desktop/app/src/chrome/ShareSheetErrorList.tsx b/desktop/app/src/chrome/ShareSheetErrorList.tsx index 067499847..c1534e188 100644 --- a/desktop/app/src/chrome/ShareSheetErrorList.tsx +++ b/desktop/app/src/chrome/ShareSheetErrorList.tsx @@ -51,8 +51,10 @@ export default class Popover extends PureComponent { {this.props.title} - {this.props.errors.map((e: Error) => ( - {formatError(e)} + {this.props.errors.map((e: Error, index) => ( + + {formatError(e)} + ))} diff --git a/desktop/plugins/hermesdebuggerrn/SelectScreen.tsx b/desktop/plugins/hermesdebuggerrn/SelectScreen.tsx index 102411d16..28d4cb64b 100644 --- a/desktop/plugins/hermesdebuggerrn/SelectScreen.tsx +++ b/desktop/plugins/hermesdebuggerrn/SelectScreen.tsx @@ -71,7 +71,7 @@ export default function SelectScreen(props: Props) { {props.targets.map((target) => { return ( - props.onSelect(target)}> + props.onSelect(target)} key={target.id}> {target.title} diff --git a/desktop/plugins/leak_canary/index.tsx b/desktop/plugins/leak_canary/index.tsx index e968a6081..0d97ab5f5 100644 --- a/desktop/plugins/leak_canary/index.tsx +++ b/desktop/plugins/leak_canary/index.tsx @@ -230,6 +230,7 @@ export default class LeakCanary extends FlipperPlugin< const selected = selectedIdx == idx ? selectedEid : null; return ( { {events.map((event: NavigationEvent, idx: number) => { return ( - + JSON.parse(json)) - .map((data) => {data}); + .map((data, idx) => {data}); } } }; diff --git a/desktop/plugins/sandbox/index.tsx b/desktop/plugins/sandbox/index.tsx index 137bab25a..8670d96ae 100644 --- a/desktop/plugins/sandbox/index.tsx +++ b/desktop/plugins/sandbox/index.tsx @@ -128,9 +128,8 @@ export default class SandboxView extends FlipperPlugin< {this.state.sandboxes.map((sandbox) => ( - + this.onSendSandboxEnvironment(sandbox.value)}> {sandbox.name}