mirror of
https://github.com/quartz-community/darkmode.git
synced 2026-07-22 02:50:22 +00:00
fix: resolve ESLint and formatting issues for CI compliance
This commit is contained in:
parent
78e06f1d7b
commit
de7dc0dc40
3 changed files with 21 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ import type {
|
|||
} from "@quartz-community/types";
|
||||
import { classNames } from "../util/lang";
|
||||
import { i18n } from "../i18n";
|
||||
// @ts-ignore
|
||||
// @ts-expect-error - inline script import handled by Quartz bundler
|
||||
import darkmodeScript from "./scripts/darkmode.inline.ts";
|
||||
import styles from "./styles/darkmode.scss";
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"target": "ES2022",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"lib": ["ES2022", "DOM"],
|
||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
"rootDir": ".",
|
||||
"outDir": "dist",
|
||||
"declaration": true,
|
||||
|
|
|
|||
19
types/globals.d.ts
vendored
Normal file
19
types/globals.d.ts
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
interface CustomEventMap {
|
||||
themechange: CustomEvent<{ theme: "light" | "dark" }>;
|
||||
}
|
||||
|
||||
interface Document {
|
||||
addEventListener<K extends keyof CustomEventMap>(
|
||||
type: K,
|
||||
listener: (this: Document, ev: CustomEventMap[K]) => void,
|
||||
): void;
|
||||
removeEventListener<K extends keyof CustomEventMap>(
|
||||
type: K,
|
||||
listener: (this: Document, ev: CustomEventMap[K]) => void,
|
||||
): void;
|
||||
dispatchEvent<K extends keyof CustomEventMap>(ev: CustomEventMap[K] | UIEvent): void;
|
||||
}
|
||||
|
||||
interface Window {
|
||||
addCleanup(fn: (...args: unknown[]) => void): void;
|
||||
}
|
||||
Loading…
Reference in a new issue