From 020317124e4e8142e853343ca6a0d9fc0f4e4cc8 Mon Sep 17 00:00:00 2001 From: saberzero1 Date: Mon, 9 Mar 2026 03:47:02 +0100 Subject: [PATCH] fix: resolve ESLint and formatting issues for CI compliance --- src/components/NoteProperties.tsx | 2 +- src/components/scripts/noteProperties.inline.ts | 8 +++----- src/transformer.ts | 5 ++--- types/globals.d.ts | 3 +++ 4 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 types/globals.d.ts diff --git a/src/components/NoteProperties.tsx b/src/components/NoteProperties.tsx index 1725c1a..f325885 100644 --- a/src/components/NoteProperties.tsx +++ b/src/components/NoteProperties.tsx @@ -7,7 +7,7 @@ import { classNames } from "../util/lang"; import { resolveRelative } from "../util/path"; import { i18n } from "../i18n"; import style from "./styles/noteProperties.scss"; -// @ts-ignore +// @ts-expect-error - inline script import handled by Quartz bundler import script from "./scripts/noteProperties.inline.ts"; export interface NotePropertiesComponentOptions { diff --git a/src/components/scripts/noteProperties.inline.ts b/src/components/scripts/noteProperties.inline.ts index f098d3b..90a9750 100644 --- a/src/components/scripts/noteProperties.inline.ts +++ b/src/components/scripts/noteProperties.inline.ts @@ -1,9 +1,7 @@ -// @ts-nocheck - const STORAGE_KEY = "note-properties-collapsed"; function init() { - const details = document.querySelector("details.note-properties"); + const details = document.querySelector("details.note-properties"); if (!details) return; const saved = localStorage.getItem(STORAGE_KEY); @@ -12,9 +10,9 @@ function init() { details.open = !isCollapsed; } - function toggleHandler() { + const toggleHandler = () => { localStorage.setItem(STORAGE_KEY, String(!details.open)); - } + }; details.addEventListener("toggle", toggleHandler); diff --git a/src/transformer.ts b/src/transformer.ts index 0e4a088..fc7f276 100644 --- a/src/transformer.ts +++ b/src/transformer.ts @@ -2,7 +2,6 @@ import matter from "gray-matter"; import remarkFrontmatter from "remark-frontmatter"; import yaml from "js-yaml"; import toml from "toml"; -import type { PluggableList } from "unified"; import type { QuartzTransformerPlugin, BuildCtx, @@ -162,8 +161,8 @@ export const NoteProperties: QuartzTransformerPlugin { diff --git a/types/globals.d.ts b/types/globals.d.ts new file mode 100644 index 0000000..72edf9c --- /dev/null +++ b/types/globals.d.ts @@ -0,0 +1,3 @@ +interface Window { + addCleanup(fn: (...args: unknown[]) => void): void; +}