Plugin Studio branch: lint the new code to the site's style

The map slot's template puts one attribute per line. The runtime loader and the
map composable put one statement per line. The origins check drops a redundant
pair of parentheses. No behaviour changes. Every file this branch touched now
has no more lint findings than it had before.
This commit is contained in:
doxa-maps 2026-09-29 05:12:51 +00:00
parent 80b6cd5775
commit bdac891e90
4 changed files with 30 additions and 7 deletions

View file

@ -56,11 +56,29 @@ const effectiveConfig = computed(() => {
<template>
<div class="doxa-map-slot" :aria-busy="ready ? undefined : 'true'">
<div v-if="!ready" class="doxa-map-loading" :aria-hidden="error ? undefined : 'true'">
<p v-if="error" class="doxa-map-error" role="status">{{ error }}</p>
<span v-else class="doxa-map-spinner" />
<div
v-if="!ready"
class="doxa-map-loading"
:aria-hidden="error ? undefined : 'true'"
>
<p
v-if="error"
class="doxa-map-error"
role="status"
>
{{ error }}
</p>
<span
v-else
class="doxa-map-spinner"
/>
</div>
<component :is="tagName" v-if="base" :id="mapId" :profile-config="effectiveConfig" />
<component
:is="tagName"
v-if="base"
:id="mapId"
:profile-config="effectiveConfig"
/>
<div v-if="isSimple" class="doxa-map-scroll-pad doxa-map-scroll-pad--top" />
<slot />
</div>

View file

@ -102,7 +102,9 @@ export function useDoxaMap(bundle: BundleKey = 'simple-map') {
return src
})
// A missing address is shown at once, not after Mapbox has downloaded (the await below throws too).
mapAppJs.catch((err) => { error.value = String((err as Error)?.message || err) })
mapAppJs.catch((err) => {
error.value = String((err as Error)?.message || err)
})
await loadScript(MAPBOX_JS)
await loadScript(MAPBOX_GEOCODER_JS)
await loadScript(await mapAppJs)

View file

@ -16,7 +16,10 @@ export function loadDxRuntime(): Promise<DxRuntime> {
if (!r.ok) throw new Error(`/api/dx-runtime answered ${r.status}`)
return r.json() as Promise<DxRuntime>
})
.catch((e) => { pending = null; throw e })
.catch((e) => {
pending = null
throw e
})
}
return pending
}

View file

@ -62,7 +62,7 @@ const HOST = /(\bnuxtbase\.app\b|\bsslip\.io\b|\b[a-z0-9-]+\.localhost\b|localho
const sources = [
...walk(join(ROOT, 'app')), ...walk(join(ROOT, 'server')), ...walk(join(ROOT, 'modules')),
join(ROOT, 'nuxt.config.ts'),
...walk(join(ROOT, 'public')).filter((f) => f.endsWith('.html') && !rel(f).startsWith('public/assets/'))
...walk(join(ROOT, 'public')).filter(f => f.endsWith('.html') && !rel(f).startsWith('public/assets/'))
]
for (const file of sources) {
scanned += 1