chore(eslint): use moeru config (#664)

This commit is contained in:
藍+85CD
2025-10-18 19:02:01 +08:00
committed by GitHub
parent 1532bc60d6
commit ee42ab85b1
10 changed files with 219 additions and 95 deletions
@@ -32,9 +32,9 @@ export function themeColorFromValue(value: string | { light: string, dark: strin
export function useThemeColor(colorFrom: () => string | Promise<string>) {
async function updateThemeColor() {
if (!('document' in globalThis && globalThis.document != null))
if (!('document' in globalThis) || globalThis.document == null)
return
if (!('window' in globalThis && globalThis.window != null))
if (!('window' in globalThis) || globalThis.window == null)
return
document.querySelector('meta[name="theme-color"]')?.setAttribute('content', new Color(await colorFrom()).to('srgb').toString({ format: 'hex' }))
@@ -32,9 +32,9 @@ export function themeColorFromValue(value: string | { light: string, dark: strin
export function useThemeColor(colorFrom: () => string | Promise<string>) {
async function updateThemeColor() {
if (!('document' in globalThis && globalThis.document != null))
if (!('document' in globalThis) || globalThis.document == null)
return
if (!('window' in globalThis && globalThis.window != null))
if (!('window' in globalThis) || globalThis.window == null)
return
document.querySelector('meta[name="theme-color"]')?.setAttribute('content', new Color(await colorFrom()).to('srgb').toString({ format: 'hex' }))
+1 -1
View File
@@ -6,7 +6,7 @@ export function isStandalone() {
if (import.meta.env.SSR) {
return false
}
if (!('window' in globalThis && globalThis.window != null)) {
if (!('window' in globalThis) || globalThis.window == null) {
return false
}