chore: Add typescript support to eslint, fix errors (#2923)
This commit is contained in:
parent
e3030bfcc8
commit
4235c8b491
16 changed files with 309 additions and 31 deletions
|
|
@ -18,11 +18,11 @@ function itemHasMultiple(item: HardwareMetadata) {
|
|||
|
||||
function itemIds(item: HardwareMetadata) {
|
||||
if (item.type == "board" || item.type == "shield") {
|
||||
let nodes = (item.siblings ?? [item.id])
|
||||
.map<ElementOrString>((id) => <code key={id}>{id}</code>)
|
||||
.reduce(
|
||||
const nodes = (item.siblings ?? [item.id])
|
||||
.map((id) => <code key={id}>{id}</code>)
|
||||
.reduce<ElementOrString[]>(
|
||||
(prev, curr, index) => [...prev, index > 0 ? ", " : "", curr],
|
||||
[] as ElementOrString[]
|
||||
[]
|
||||
);
|
||||
return <span key={item.id}>{nodes}</span>;
|
||||
} else {
|
||||
|
|
@ -81,7 +81,7 @@ function mapInterconnect({
|
|||
}
|
||||
|
||||
function HardwareList({ items }: HardwareListProps) {
|
||||
let grouped = groupedMetadata(items);
|
||||
const grouped = groupedMetadata(items);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue