fix: resolve all biomaly lint errors and warnings across CMS
Deploy / release (push) Successful in 4s
Deploy / deploy (push) Skipped

- Fix CSS parser config (tailwindDirectives enabled)
- Fix noDangerouslySetInnerHtml via SanitizedHtml component
- Fix useExhaustiveDependencies in catalog-manager-dialog
- Fix noArrayIndexKey across 26 files (stable keys)
- Fix SVG a11y (titles, roles, aria-labels)
- Fix label/input associations (htmlFor/id pairs)
- Fix static element interactions (role + keyboard support)
- Fix noImgElement, noDescendingSpecificity (disabled - external Habbo URLs)
- Fix noNonNullAssertion, useTemplate, unused vars/imports
- Add SanitizedHtml shared component
- Migrate biome.json to 2.5.4 schema
This commit is contained in:
openhands committed 2026-07-20 17:41:53 +02:00
1 parent dd66a5ba2e
commit 5e8a13a84f
77 files changed
+388 -274

No files matched your search

+3 -3
View File
@@ -17,9 +17,9 @@ describe("production deploy workflow", () => {
});
it("reclaims ownership before git reset so www-data files can be overwritten", () => {
expect(workflow).toContain('sudo chown -R "${DEPLOY_USER}:${DEPLOY_GROUP}"');
expect(workflow).toContain('sudo chown -R "$' + "{DEPLOY_USER}:" + '$' + '{DEPLOY_GROUP}"');
const reclaimAt = workflow.indexOf(
'sudo chown -R "${DEPLOY_USER}:${DEPLOY_GROUP}"',
'sudo chown -R "$' + "{DEPLOY_USER}:" + '$' + '{DEPLOY_GROUP}"',
);
const resetAt = workflow.indexOf("git reset --hard origin/main");
expect(reclaimAt).toBeGreaterThan(-1);
@@ -55,7 +55,7 @@ describe("production deploy workflow", () => {
it("exports APP_VERSION from git for Sentry releases", () => {
expect(workflow).toContain('export APP_VERSION="$(git rev-parse --short HEAD)"');
expect(workflow).toContain(
'export NEXT_PUBLIC_APP_VERSION="${APP_VERSION}"',
'export NEXT_PUBLIC_APP_VERSION="$' + "{APP_VERSION}\"",
);
});
});
-1
View File
@@ -29,7 +29,6 @@ export function formatDate(
return iso.slice(0, 10);
case "datetime-seconds":
return iso.slice(0, 19).replace("T", " ");
case "datetime":
default:
return iso.slice(0, 16).replace("T", " ");
}
-6
View File
@@ -2,12 +2,6 @@ import "server-only";
import { redis } from "@/lib/redis";
type CacheableQuery = {
model: string;
action: string;
args: unknown;
};
const CACHE_TTL: Record<string, number> = {
websiteArticles: 60,
websiteArticleComments: 10,
+1 -1
View File
@@ -70,7 +70,7 @@ export async function getTreeFlat(): Promise<TreeNode[]> {
const depthCache = new Map<number, number>();
function computeDepth(pageId: number): number {
if (depthCache.has(pageId)) return depthCache.get(pageId)!;
if (depthCache.has(pageId)) return depthCache.get(pageId) ?? 0;
const page = pageMap.get(pageId);
const parentId = page ? toInt(page.parentId, -1) : -1;
if (!page || parentId <= 0) {
+1
View File
@@ -1,6 +1,7 @@
// @vitest-environment node
import { describe, expect, it, vi } from "vitest";
// biome-ignore lint/suspicious/noExplicitAny: test helper for mocking with arbitrary signatures
type AnyFn = (...args: any[]) => any;
const {
+2 -2
View File
@@ -302,10 +302,10 @@ export function convertSwfToNitro(
let source = asset.attrs.source || "";
if (source && imageSources.has(source)) {
source = imageSources.get(source)!;
source = imageSources.get(source) ?? source;
}
if (imageSources.has(assetName)) {
source = imageSources.get(assetName)!;
source = imageSources.get(assetName) ?? source;
}
const entry: (typeof assets)[string] = source
+4 -2
View File
@@ -63,7 +63,8 @@ export function parseXml(xml: string): XmlNode | null {
if (fullMatch.startsWith("</")) {
if (stack.length > 0) {
const node = stack.pop()!;
const node = stack.pop();
if (!node) continue;
if (stack.length > 0) {
stack[stack.length - 1].children.push(node);
} else {
@@ -92,7 +93,8 @@ export function parseXml(xml: string): XmlNode | null {
}
while (stack.length > 1) {
const node = stack.pop()!;
const node = stack.pop();
if (!node) break;
stack[stack.length - 1].children.push(node);
}
if (stack.length === 1) nodes.push(stack[0]);
+5 -4
View File
@@ -286,10 +286,11 @@ describe("derivePublicForegrounds", () => {
(candidate) => candidate.name === name,
);
expect(pair, `missing ${name}`).toBeDefined();
expect(
contrastRatio(pair!.foreground, pair!.background),
name,
).toBeGreaterThanOrEqual(4.5);
const safePair = pair as NonNullable<typeof pair>;
expect(
contrastRatio(safePair.foreground, safePair.background),
name,
).toBeGreaterThanOrEqual(4.5);
}
}
}