diff --git a/docs/rules/jsx-key.md b/docs/rules/jsx-key.md index 91b7c3d7e8..b64307b419 100644 --- a/docs/rules/jsx-key.md +++ b/docs/rules/jsx-key.md @@ -5,13 +5,17 @@ array literal or an arrow function expression. ## Rule Details -Three different examples of **incorrect** code for this rule: +Examples of **incorrect** code for this rule: ```jsx [, , ]; +``` +```jsx data.map(x => {x}); +``` +```jsx ``` @@ -21,9 +25,13 @@ Examples of **correct** code for this rule: ```jsx [, , ]; +``` +```jsx data.map((x) => {x}); +``` +```jsx ``` @@ -43,7 +51,9 @@ Examples of **incorrect** code for this rule: ```jsx [<>, <>, <>]; +``` +```jsx data.map(x => <>{x}); ```