fix: centralize type declarations and add missing dependencies

- Update types/globals.d.ts with centralized type declarations (CustomEvent<object>)
- Add missing devDependencies for CI compliance
- Add .prettierignore, update .eslintrc.json with triple-slash-reference override
- Remove duplicate scripts.d.ts/styles.d.ts
This commit is contained in:
saberzero1 2026-03-16 18:54:32 +01:00
parent be9105ac10
commit 02d37eed70
No known key found for this signature in database
7 changed files with 55 additions and 15 deletions

View file

@ -22,5 +22,13 @@
"caughtErrorsIgnorePattern": "^_"
}
]
}
},
"overrides": [
{
"files": ["types/**/*.d.ts"],
"rules": {
"@typescript-eslint/triple-slash-reference": "off"
}
}
]
}

1
.prettierignore Normal file
View file

@ -0,0 +1 @@
dist

33
package-lock.json generated
View file

@ -24,6 +24,7 @@
"sass": "^1.97.3",
"tsup": "^8.5.0",
"typescript": "^5.9.3",
"unified": "^11.0.5",
"vitest": "^2.1.9"
},
"engines": {
@ -1896,8 +1897,8 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz",
"integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==",
"devOptional": true,
"license": "MIT",
"optional": true,
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
@ -2514,8 +2515,8 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
"license": "MIT",
"optional": true
"devOptional": true,
"license": "MIT"
},
"node_modules/fast-deep-equal": {
"version": "3.1.3",
@ -2949,8 +2950,8 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz",
"integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==",
"devOptional": true,
"license": "MIT",
"optional": true,
"engines": {
"node": ">=12"
},
@ -4138,8 +4139,8 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz",
"integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==",
"devOptional": true,
"license": "MIT",
"optional": true,
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
@ -4283,6 +4284,27 @@
"dev": true,
"license": "MIT"
},
"node_modules/unified": {
"version": "11.0.5",
"resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz",
"integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==",
"devOptional": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@types/unist": "^3.0.0",
"bail": "^2.0.0",
"devlop": "^1.0.0",
"extend": "^3.0.0",
"is-plain-obj": "^4.0.0",
"trough": "^2.0.0",
"vfile": "^6.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/unist-util-is": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz",
@ -4372,6 +4394,7 @@
"integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==",
"devOptional": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@types/unist": "^3.0.0",
"vfile-message": "^4.0.0"

View file

@ -55,8 +55,8 @@
},
"peerDependencies": {
"@jackyzha0/quartz": "^4.5.2",
"preact": "^10.0.0",
"hast-util-to-html": "^9.0.4",
"preact": "^10.0.0",
"unified": "^11.0.5",
"vfile": "^6.0.3"
},
@ -93,6 +93,7 @@
"sass": "^1.97.3",
"tsup": "^8.5.0",
"typescript": "^5.9.3",
"unified": "^11.0.5",
"vitest": "^2.1.9"
},
"quartz": {

View file

@ -1,4 +0,0 @@
declare module "*.inline.ts" {
const content: string;
export default content;
}

View file

@ -1,4 +0,0 @@
declare module "*.scss" {
const content: string;
export default content;
}

15
types/globals.d.ts vendored
View file

@ -1,7 +1,19 @@
declare module "*.scss" {
const content: string;
export default content;
}
declare module "*.inline.ts" {
const content: string;
export default content;
}
interface CustomEventMap {
nav: CustomEvent<{ url: string }>;
prenav: CustomEvent<undefined>;
themechange: CustomEvent<{ theme: "light" | "dark" }>;
readermodechange: CustomEvent<{ mode: "on" | "off" }>;
render: CustomEvent<object>;
}
interface Document {
@ -18,4 +30,7 @@ interface Document {
interface Window {
addCleanup(fn: (...args: unknown[]) => void): void;
spaNavigate?(url: URL, isBack: boolean): Promise<void>;
}
declare const fetchData: Promise<Record<string, unknown>>;