mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: enable react/no-array-index-key eslint (#3696)
* chore: enable react/no-array-index-key eslint * fix: add missing key to ResourcesTable
This commit is contained in:
@@ -115,6 +115,7 @@ rules:
|
||||
- error
|
||||
- children: ignore
|
||||
# https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#eslint
|
||||
react/jsx-key: error
|
||||
react/jsx-uses-react: "off"
|
||||
react/react-in-jsx-scope: "off"
|
||||
settings:
|
||||
|
||||
@@ -55,7 +55,7 @@ export const TemplateResourcesTable: FC<React.PropsWithChildren<TemplateResource
|
||||
// If there is no agent, just display the resource name
|
||||
if (!agent) {
|
||||
return (
|
||||
<TableRow>
|
||||
<TableRow key={resource.id}>
|
||||
<TableCell className={styles.resourceNameCell}>
|
||||
<AvatarData
|
||||
title={resource.name}
|
||||
|
||||
Reference in New Issue
Block a user