Fix/Improve linting

This commit is contained in:
2026-08-06 08:50:21 +02:00
parent f641ad5f43
commit 06a16c5b64
288 changed files with 3372 additions and 1536 deletions
+4 -2
View File
@@ -2,11 +2,13 @@ import { REV } from '../generated/rev';
/* istanbul ignore next */
export function getUrl(name: string): string {
if (DEVELOPMENT)
if (DEVELOPMENT) {
return `/assets/${name}`;
}
if (!REV[name])
if (!REV[name]) {
throw new Error(`Cannot find file url (${name})`);
}
return `/assets/${name.replace(/(\.\S+)$/, `-${REV[name]}$1`)}`;
}