Upgrade Biome

This commit is contained in:
Kalle 2025-07-06 12:18:25 +03:00
parent f44155b3f1
commit f576b4da9a
7 changed files with 128 additions and 131 deletions

View File

@ -210,9 +210,9 @@ export function MapPoolStages({
width={80}
height={45}
/>
{/** biome-ignore lint/a11y/useSemanticElements: todo */}
<div
className={styles.stageNameRow}
// biome-ignore lint/a11y/useSemanticElements: todo
role="group"
aria-labelledby={`${id}-stage-name-${stageId}`}
>

View File

@ -1592,104 +1592,99 @@ function DamageTable({
};
return (
<>
<Table>
<thead>
<tr>
<th>{t("analyzer:damage.header.type")}</th>
{showDistanceColumn && (
<th>{t("analyzer:damage.header.distance")}</th>
)}
{damageIsSubWeaponDamage(firstRow) ? (
<th>
{comparisonValues
? t("analyzer:damage.header.baseDamage.short")
: t("analyzer:damage.header.baseDamage")}
</th>
) : null}
{showDamageColumn && <th>{t("analyzer:damage.header.damage")}</th>}
{showPopovers ? <th /> : null}
</tr>
</thead>
<tbody>
{values.map((val, i) => {
if (val.type.includes("SECONDARY")) return null;
<Table>
<thead>
<tr>
<th>{t("analyzer:damage.header.type")}</th>
{showDistanceColumn && (
<th>{t("analyzer:damage.header.distance")}</th>
)}
{damageIsSubWeaponDamage(firstRow) ? (
<th>
{comparisonValues
? t("analyzer:damage.header.baseDamage.short")
: t("analyzer:damage.header.baseDamage")}
</th>
) : null}
{showDamageColumn && <th>{t("analyzer:damage.header.damage")}</th>}
{showPopovers ? <th /> : null}
</tr>
</thead>
<tbody>
{values.map((val, i) => {
if (val.type.includes("SECONDARY")) return null;
const damage = (val: AnalyzedBuild["stats"]["damages"][number]) =>
multiShots && damageTypeToWeaponType[val.type] === "MAIN"
? multiShotValues(val).join(" + ")
: val.value;
const damage = (val: AnalyzedBuild["stats"]["damages"][number]) =>
multiShots && damageTypeToWeaponType[val.type] === "MAIN"
? multiShotValues(val).join(" + ")
: val.value;
const typeRowName = damageIsSubWeaponDamage(val)
? `weapons:SUB_${val.subWeaponId}`
: `analyzer:damage.${val.type}`;
const typeRowName = damageIsSubWeaponDamage(val)
? `weapons:SUB_${val.subWeaponId}`
: `analyzer:damage.${val.type}`;
const comparisonVal = comparisonValues?.[i];
const comparisonVal = comparisonValues?.[i];
return (
<tr key={val.id}>
<td className="stack horizontal xs items-center">
{damageIsSubWeaponDamage(val) ? (
<Image
alt=""
path={subWeaponImageUrl(val.subWeaponId)}
width={12}
height={12}
return (
<tr key={val.id}>
<td className="stack horizontal xs items-center">
{damageIsSubWeaponDamage(val) ? (
<Image
alt=""
path={subWeaponImageUrl(val.subWeaponId)}
width={12}
height={12}
/>
) : null}{" "}
{t(typeRowName as any)}{" "}
{damageIsSubWeaponDamage(val) && val.type === "SPLASH" ? (
<>({t("analyzer:damage.SPLASH")})</>
) : null}
</td>
{showDistanceColumn && (
<td>
{typeof val.distance === "number"
? val.distance
: val.distance?.join("-")}
</td>
)}
{damageIsSubWeaponDamage(val) && <td>{val.baseValue}</td>}
{showDamageColumn && (
<td>
{damage(val)}
{comparisonVal ? `/${damage(comparisonVal)}` : null}{" "}
{val.shotsToSplat && (
<span className="analyzer__shots-to-splat">
{t("analyzer:damage.toSplat", {
count: val.shotsToSplat,
})}
</span>
)}
</td>
)}
{showPopovers ? (
<td>
{renderPopover(val, (val as SubWeaponDamage).subWeaponId) ? (
<StatChartPopover
mainWeaponId={0}
modifiedBy={[]}
subWeaponId={(val as SubWeaponDamage).subWeaponId}
title={t(
`weapons:SUB_${(val as SubWeaponDamage).subWeaponId}`,
)}
simple
valueSuffix={` ${t(
"analyzer:damageShort",
).toLowerCase()}`}
/>
) : null}{" "}
{t(typeRowName as any)}{" "}
{damageIsSubWeaponDamage(val) && val.type === "SPLASH" ? (
<>({t("analyzer:damage.SPLASH")})</>
) : null}
</td>
{showDistanceColumn && (
<td>
{typeof val.distance === "number"
? val.distance
: val.distance?.join("-")}
</td>
)}
{damageIsSubWeaponDamage(val) && <td>{val.baseValue}</td>}
{showDamageColumn && (
<td>
{damage(val)}
{comparisonVal ? `/${damage(comparisonVal)}` : null}{" "}
{val.shotsToSplat && (
<span className="analyzer__shots-to-splat">
{t("analyzer:damage.toSplat", {
count: val.shotsToSplat,
})}
</span>
)}
</td>
)}
{showPopovers ? (
<td>
{renderPopover(
val,
(val as SubWeaponDamage).subWeaponId,
) ? (
<StatChartPopover
mainWeaponId={0}
modifiedBy={[]}
subWeaponId={(val as SubWeaponDamage).subWeaponId}
title={t(
`weapons:SUB_${(val as SubWeaponDamage).subWeaponId}`,
)}
simple
valueSuffix={` ${t(
"analyzer:damageShort",
).toLowerCase()}`}
/>
) : null}
</td>
) : null}
</tr>
);
})}
</tbody>
</Table>
</>
) : null}
</tr>
);
})}
</tbody>
</Table>
);
}

View File

@ -28,7 +28,7 @@ function ImageValidator() {
}, [data]);
if (data.images.length === 0) {
return <>All validated!</>;
return "All validated!";
}
return (

View File

@ -39,7 +39,8 @@
}
.team__banner {
background-image: linear-gradient(
background-image:
linear-gradient(
to bottom,
rgba(255, 255, 255, 0),
rgba(255, 255, 255, 0),

View File

@ -145,6 +145,7 @@ function PovFormField() {
field: { onChange, onBlur, value },
fieldState: { error },
}) => {
// biome-ignore lint/complexity/noUselessFragments: Biome upgrade
if (!value) return <></>;
const asPlainInput = value.type === "NAME";

72
package-lock.json generated
View File

@ -63,7 +63,7 @@
"zod": "^3.25.61"
},
"devDependencies": {
"@biomejs/biome": "2.0.4",
"@biomejs/biome": "2.0.6",
"@playwright/test": "^1.52.0",
"@remix-run/dev": "^2.16.8",
"@remix-run/route-config": "^2.16.8",
@ -1470,9 +1470,9 @@
}
},
"node_modules/@biomejs/biome": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.0.4.tgz",
"integrity": "sha512-DNA++xe+E7UugTvI/HhzSFl6OwrVgU8SIV0Mb2fPtWPk2/oTr4eOSA5xy1JECrvgJeYxurmUBOS49qxv/OUkrQ==",
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.0.6.tgz",
"integrity": "sha512-RRP+9cdh5qwe2t0gORwXaa27oTOiQRQvrFf49x2PA1tnpsyU7FIHX4ZOFMtBC4QNtyWsN7Dqkf5EDbg4X+9iqA==",
"dev": true,
"license": "MIT OR Apache-2.0",
"bin": {
@ -1486,20 +1486,20 @@
"url": "https://opencollective.com/biome"
},
"optionalDependencies": {
"@biomejs/cli-darwin-arm64": "2.0.4",
"@biomejs/cli-darwin-x64": "2.0.4",
"@biomejs/cli-linux-arm64": "2.0.4",
"@biomejs/cli-linux-arm64-musl": "2.0.4",
"@biomejs/cli-linux-x64": "2.0.4",
"@biomejs/cli-linux-x64-musl": "2.0.4",
"@biomejs/cli-win32-arm64": "2.0.4",
"@biomejs/cli-win32-x64": "2.0.4"
"@biomejs/cli-darwin-arm64": "2.0.6",
"@biomejs/cli-darwin-x64": "2.0.6",
"@biomejs/cli-linux-arm64": "2.0.6",
"@biomejs/cli-linux-arm64-musl": "2.0.6",
"@biomejs/cli-linux-x64": "2.0.6",
"@biomejs/cli-linux-x64-musl": "2.0.6",
"@biomejs/cli-win32-arm64": "2.0.6",
"@biomejs/cli-win32-x64": "2.0.6"
}
},
"node_modules/@biomejs/cli-darwin-arm64": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.0.4.tgz",
"integrity": "sha512-r5McIUMMiedwJ2rltuXhj0+w0W7IJLpkOS+OGCVZQQOOcrGY9gUSUmOo7O6Z7P0vlv5YYZkPbi+qR9MDDWRBSw==",
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.0.6.tgz",
"integrity": "sha512-AzdiNNjNzsE6LfqWyBvcL29uWoIuZUkndu+wwlXW13EKcBHbbKjNQEZIJKYDc6IL+p7bmWGx3v9ZtcRyIoIz5A==",
"cpu": [
"arm64"
],
@ -1514,9 +1514,9 @@
}
},
"node_modules/@biomejs/cli-darwin-x64": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.0.4.tgz",
"integrity": "sha512-aV5Zc/3E3aXFbrjK1IgCMEQc+6PCkBL+NS+vtjoNM2VPFeM5OL5Q82BI4YZyPnebj+k42BPIoYtz0jJ95PGRRg==",
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.0.6.tgz",
"integrity": "sha512-wJjjP4E7bO4WJmiQaLnsdXMa516dbtC6542qeRkyJg0MqMXP0fvs4gdsHhZ7p9XWTAmGIjZHFKXdsjBvKGIJJQ==",
"cpu": [
"x64"
],
@ -1531,9 +1531,9 @@
}
},
"node_modules/@biomejs/cli-linux-arm64": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.0.4.tgz",
"integrity": "sha512-nlJhf7DyuajMj+S7Ygum59cbrHvI/nSRvedfJcEIx4X7SsiZjpRUiC5XtEn77kg7NIKq/KqG5roQIHkmjuFHCw==",
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.0.6.tgz",
"integrity": "sha512-ZSVf6TYo5rNMUHIW1tww+rs/krol7U5A1Is/yzWyHVZguuB0lBnIodqyFuwCNqG9aJGyk7xIMS8HG0qGUPz0SA==",
"cpu": [
"arm64"
],
@ -1548,9 +1548,9 @@
}
},
"node_modules/@biomejs/cli-linux-arm64-musl": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.0.4.tgz",
"integrity": "sha512-cNukq2PthoOa7quqaKoEFz4Zd1pDPJGfTR5jVyk9Z9iFHEm6TI7+7eeIs3aYcEuuJPNFR9xhJ4Uj3E2iUWkV3A==",
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.0.6.tgz",
"integrity": "sha512-CVPEMlin3bW49sBqLBg2x016Pws7eUXA27XYDFlEtponD0luYjg2zQaMJ2nOqlkKG9fqzzkamdYxHdMDc2gZFw==",
"cpu": [
"arm64"
],
@ -1565,9 +1565,9 @@
}
},
"node_modules/@biomejs/cli-linux-x64": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.0.4.tgz",
"integrity": "sha512-jlzrNZ+OzN9wvp2RL3cl5Y4NiV7xSU+QV5A8bWXke1on3jKy7QbXajybSjVQ6aFw1gdrqkO/W8xV5HODhIMT4g==",
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.0.6.tgz",
"integrity": "sha512-geM1MkHTV1Kh2Cs/Xzot9BOF3WBacihw6bkEmxkz4nSga8B9/hWy5BDiOG3gHDGIBa8WxT0nzsJs2f/hPqQIQw==",
"cpu": [
"x64"
],
@ -1582,9 +1582,9 @@
}
},
"node_modules/@biomejs/cli-linux-x64-musl": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.0.4.tgz",
"integrity": "sha512-oWQALSbp8xF0t/wiHU2zdkZOpIHyaI9QxQv0Ytty9GAKsCGP6pczp8qyKD/P49iGJdDozHp5KiuQPxs33APhyA==",
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.0.6.tgz",
"integrity": "sha512-mKHE/e954hR/hSnAcJSjkf4xGqZc/53Kh39HVW1EgO5iFi0JutTN07TSjEMg616julRtfSNJi0KNyxvc30Y4rQ==",
"cpu": [
"x64"
],
@ -1599,9 +1599,9 @@
}
},
"node_modules/@biomejs/cli-win32-arm64": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.0.4.tgz",
"integrity": "sha512-/PbNhMJo9ONja7hOxLlifM/qgeHpRD9bF2flTz5KIrXnQqpuegaRuwP/HYdJ9TFkTKFjHkPLoE4onOz3HIT5CQ==",
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.0.6.tgz",
"integrity": "sha512-290V4oSFoKaprKE1zkYVsDfAdn0An5DowZ+GIABgjoq1ndhvNxkJcpxPsiYtT7slbVe3xmlT0ncdfOsN7KruzA==",
"cpu": [
"arm64"
],
@ -1616,9 +1616,9 @@
}
},
"node_modules/@biomejs/cli-win32-x64": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.0.4.tgz",
"integrity": "sha512-dIM4SgO4/Rmsb4X7fwKtciQ682SZDSC1lm42uSM9gt8zNqBIeTaqsMc6eO1DpxYWMlAb/n2SML9+HUHmCib7NA==",
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.0.6.tgz",
"integrity": "sha512-bfM1Bce0d69Ao7pjTjUS+AWSZ02+5UHdiAP85Th8e9yV5xzw6JrHXbL5YWlcEKQ84FIZMdDc7ncuti1wd2sdbw==",
"cpu": [
"x64"
],

View File

@ -83,7 +83,7 @@
"zod": "^3.25.61"
},
"devDependencies": {
"@biomejs/biome": "2.0.4",
"@biomejs/biome": "2.0.6",
"@playwright/test": "^1.52.0",
"@remix-run/dev": "^2.16.8",
"@remix-run/route-config": "^2.16.8",