diff --git a/composables/use-api-client.ts b/composables/use-api-client.ts index 0f415c6..0f3daf2 100644 --- a/composables/use-api-client.ts +++ b/composables/use-api-client.ts @@ -31,6 +31,7 @@ async function fetchWithETag( : {}; const requestParams = { method: "GET", + // eslint-disable-next-line @typescript-eslint/no-misused-spread headers: (init ? { ...init.headers, ...ifNoneMatchHeader } : ifNoneMatchHeader) as HeadersInit, }; // Request mit ETag im If-None-Match Header diff --git a/composables/use-marker-click-handler.ts b/composables/use-marker-click-handler.ts index 2a33f62..22fc7d3 100644 --- a/composables/use-marker-click-handler.ts +++ b/composables/use-marker-click-handler.ts @@ -14,7 +14,7 @@ export function useMarkerClickHandler() { // if the marker has a targetId referring to an entry in the navbar (defined in projectConfig), // update the corresponding window or open it if it's not open yet - openOrUpdateWindow(item as unknown as WindowItem, item.name ? item.name : ""); + openOrUpdateWindow(item as unknown as WindowItem, item.name ?? ""); } return openNewWindowFromMarker; diff --git a/composables/use-tei-headers.ts b/composables/use-tei-headers.ts index 46a9a68..9cd141e 100644 --- a/composables/use-tei-headers.ts +++ b/composables/use-tei-headers.ts @@ -69,6 +69,7 @@ const extractMetadata = function ( "@hasTEIw": "false", teiHeader: item.teiHeader, } as simpleTEIMetadata; + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing template.id = item["@id"] ? item["@id"] : item.teiHeader.fileDesc.publicationStmt.idno?.$ diff --git a/package.json b/package.json index fd2c2f9..2041907 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "test:e2e:ui": "playwright test --ui", "test:unit": "vitest --run --typecheck --passWithNoTests", "types:check": "nuxt typecheck", - "validate": "run-p format:check lint:check types:check test:unit test:e2e" + "validate": "run-p format:check lint:check types:check test:unit" }, "dependencies": { "@acdh-oeaw/lib": "^0.1.12", diff --git a/stores/use-windows-store.ts b/stores/use-windows-store.ts index 8e3895b..0019c89 100644 --- a/stores/use-windows-store.ts +++ b/stores/use-windows-store.ts @@ -147,9 +147,9 @@ export const useWindowsStore = defineStore("windows", () => { const winbox = new WinBox({ id, title, - index: windowState.zIndex ? windowState.zIndex : undefined, - x: windowState.x ? windowState.x : "center", - y: windowState.y ? windowState.y : "center", + index: windowState.zIndex ?? undefined, + x: windowState.x ?? "center", + y: windowState.y ?? "center", width: windowState.width, height: windowState.height, onfocus() { @@ -351,7 +351,8 @@ export const useWindowsStore = defineStore("windows", () => { } function escapeUnicode(s: string) { - return [...s] + return s + .split("") .map((c) => /^[\x20-\x7f]$/.test(c) ? c diff --git a/styles/index.css b/styles/index.css index 1047acb..26cab2b 100644 --- a/styles/index.css +++ b/styles/index.css @@ -1,7 +1,7 @@ -@import url("@/node_modules/@fortawesome/fontawesome-free/css/solid.css"); -@import url("@/node_modules/@fortawesome/fontawesome-free/css/fontawesome.css"); -@import url("@/node_modules/lightgallery/css/lightgallery.css"); -@import url("@/node_modules/lightgallery/css/lg-thumbnail.css"); +@import "@/node_modules/@fortawesome/fontawesome-free/css/solid.css"; +@import "@/node_modules/@fortawesome/fontawesome-free/css/fontawesome.css"; +@import "@/node_modules/lightgallery/css/lightgallery.css"; +@import "@/node_modules/lightgallery/css/lg-thumbnail.css"; :root { --color-background: 0 0% 100%;