mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 16:29:47 +02:00
misc: enable jsx-key eslint rule (#6584)
This commit is contained in:
parent
250d9c8cf5
commit
759952cefd
2 changed files with 4 additions and 1 deletions
|
@ -149,6 +149,7 @@ module.exports = {
|
|||
},
|
||||
],
|
||||
'react/jsx-filename-extension': OFF,
|
||||
'react/jsx-key': [ERROR, {checkFragmentShorthand: true}],
|
||||
'react/jsx-props-no-spreading': OFF,
|
||||
'react/no-array-index-key': OFF, // We build a static site, and nearly all components don't change.
|
||||
'react/no-unstable-nested-components': [WARNING, {allowAsProps: true}],
|
||||
|
|
|
@ -120,7 +120,9 @@ describe('Tabs', () => {
|
|||
values={tabs.map((t, idx) => ({label: t, value: idx}))}
|
||||
defaultValue={0}>
|
||||
{tabs.map((t, idx) => (
|
||||
<TabItem value={idx}>{t}</TabItem>
|
||||
<TabItem key={idx} value={idx}>
|
||||
{t}
|
||||
</TabItem>
|
||||
))}
|
||||
</Tabs>
|
||||
</TabGroupChoiceProvider>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue