linter fixes

This commit is contained in:
Sacha Weatherstone 2023-05-17 14:25:23 +10:00
parent 72e4742454
commit d6431dfa65
9 changed files with 1174 additions and 1185 deletions

View file

@ -13,11 +13,11 @@
}, },
"dependencies": { "dependencies": {
"@algolia/client-search": "^4.17.0", "@algolia/client-search": "^4.17.0",
"@docusaurus/core": "2.4.0", "@docusaurus/core": "2.4.1",
"@docusaurus/plugin-content-docs": "2.4.0", "@docusaurus/plugin-content-docs": "2.4.1",
"@docusaurus/preset-classic": "2.4.0", "@docusaurus/preset-classic": "2.4.1",
"@docusaurus/theme-common": "^2.4.0", "@docusaurus/theme-common": "^2.4.1",
"@docusaurus/theme-mermaid": "^2.4.0", "@docusaurus/theme-mermaid": "^2.4.1",
"@headlessui/react": "^1.7.14", "@headlessui/react": "^1.7.14",
"@heroicons/react": "^2.0.18", "@heroicons/react": "^2.0.18",
"@mdx-js/react": "^1.6.22", "@mdx-js/react": "^1.6.22",
@ -37,10 +37,10 @@
"use-breakpoint": "^3.0.7" "use-breakpoint": "^3.0.7"
}, },
"devDependencies": { "devDependencies": {
"@docusaurus/module-type-aliases": "2.4.0", "@docusaurus/module-type-aliases": "2.4.1",
"@tailwindcss/typography": "^0.5.9", "@tailwindcss/typography": "^0.5.9",
"@tsconfig/docusaurus": "^1.0.7", "@tsconfig/docusaurus": "^1.0.7",
"@types/node": "^20.1.4", "@types/node": "^20.1.7",
"@types/react": "^18.2.6", "@types/react": "^18.2.6",
"@types/react-dom": "^18.2.4", "@types/react-dom": "^18.2.4",
"rome": "^12.1.0", "rome": "^12.1.0",

File diff suppressed because it is too large Load diff

View file

@ -28,20 +28,18 @@ const Hardware = (): JSX.Element => {
</h3> </h3>
<div className="mt-4 sm:mt-0 sm:ml-10"> <div className="mt-4 sm:mt-0 sm:ml-10">
<nav className="-mb-px flex space-x-8"> <nav className="-mb-px flex space-x-8">
<a <button
href="#"
className="border-indigo-500 text-indigo-600" className="border-indigo-500 text-indigo-600"
aria-current={"page"} aria-current={"page"}
> >
Devices Devices
</a> </button>
<a <button
href="#"
className="hover:border-gray-300', 'whitespace-nowrap border-b-2 border-transparent className="hover:border-gray-300', 'whitespace-nowrap border-b-2 border-transparent
px-1 pb-4 text-sm font-medium text-gray-500 hover:text-gray-700" px-1 pb-4 text-sm font-medium text-gray-500 hover:text-gray-700"
> >
Antennas Antennas
</a> </button>
</nav> </nav>
</div> </div>
</div> </div>
@ -51,9 +49,9 @@ const Hardware = (): JSX.Element => {
role="list" role="list"
className="grid grid-cols-2 gap-x-2 gap-y-4 sm:grid-cols-3 sm:gap-x-6 lg:grid-cols-4 xl:grid-cols-5 xl:gap-x-4" className="grid grid-cols-2 gap-x-2 gap-y-4 sm:grid-cols-3 sm:gap-x-6 lg:grid-cols-4 xl:grid-cols-5 xl:gap-x-4"
> >
{hardware.map((device, index) => ( {hardware.map((device) => (
<HardwareCard <HardwareCard
key={index} key={device.name}
device={device} device={device}
setDevice={(): void => { setDevice={(): void => {
setModalData(device); setModalData(device);

View file

@ -12,7 +12,7 @@ export const Card = React.memo(({ network }: CardProps) => (
<div className="card"> <div className="card">
<div className="card__image"> <div className="card__image">
<div style={{ height: "140px" }}> <div style={{ height: "140px" }}>
<img img={mapUrl(network.nodes ?? [])} alt={network.title} /> <img src={mapUrl(network.nodes ?? [])} alt={network.title} />
</div> </div>
</div> </div>
<div className="card__body"> <div className="card__body">
@ -76,12 +76,12 @@ export const PlaceholderCard = (): JSX.Element => (
/> />
</div> </div>
<div className="card__footer"> <div className="card__footer">
<a <button
className="button disabled button--primary button--block" className="button disabled button--primary button--block"
style={{ marginBottom: "0.5rem" }} style={{ marginBottom: "0.5rem" }}
> >
&nbsp; &nbsp;
</a> </button>
<div <div
style={{ style={{
display: "flex", display: "flex",

View file

@ -9,11 +9,11 @@ export interface CardTagsProps {
export const CardTags = ({ tags }: CardTagsProps) => { export const CardTags = ({ tags }: CardTagsProps) => {
return ( return (
<div> <div>
{tags.map(({ color, label }, index) => { {tags.map(({ color, label }) => {
return ( return (
<span <span
className="badge" className="badge"
key={index} key={label}
style={{ style={{
backgroundColor: color, backgroundColor: color,
marginRight: "0.3rem", marginRight: "0.3rem",

View file

@ -29,13 +29,13 @@ export const Filters = (): JSX.Element => {
flexWrap: "wrap", flexWrap: "wrap",
}} }}
> >
{data.map((tag, i) => { {data.map((tag) => {
const { label, color } = tag; const { label, color } = tag;
const id = `showcase_checkbox_id_${tag};`; const id = `showcase_checkbox_id_${tag};`;
return ( return (
<div <div
key={i} key={tag.id}
style={{ style={{
boxSizing: "border-box", boxSizing: "border-box",
position: "relative", position: "relative",

View file

@ -61,9 +61,9 @@ export const Network = ({ id }: NetworkProps): JSX.Element => {
<h2>Bill of Materials</h2> <h2>Bill of Materials</h2>
</div> </div>
<div className="card__body"> <div className="card__body">
{data.materials?.map((material, index) => ( {data.materials?.map((material) => (
<div <div
key={index} key={material.id}
style={{ style={{
borderTop: "2px solid gray", borderTop: "2px solid gray",
display: "flex", display: "flex",

View file

@ -86,8 +86,8 @@ const OEM = (): JSX.Element => {
setOemFont(parseInt(e.target.value)); setOemFont(parseInt(e.target.value));
}} }}
> >
{enumOptions.map(([name, value], index) => ( {enumOptions.map(([name, value]) => (
<option key={index} value={value}> <option key={name} value={value}>
{name} {name}
</option> </option>
))} ))}

View file

@ -1,3 +1,6 @@
{ {
"compilerOptions": {
"moduleResolution": "node"
},
"extends": "@tsconfig/docusaurus/tsconfig.json" "extends": "@tsconfig/docusaurus/tsconfig.json"
} }