Accessibilitywarn by default
astro-doctor/require-island-fallbackrequire-island-fallback
Require fallback content for client-only and deferred server islands.
Why
client:only skips server rendering, and server:defer renders later on demand. Fallback content gives users immediate context instead of leaving an empty region while the island loads.
Examples
Incorrect
Island with no fallback
---
import Chart from '../components/Chart.tsx'
---
<Chart client:only="react" />Correct
Island with fallback content
---
import Chart from '../components/Chart.tsx'
---
<Chart client:only="react">
<div slot="fallback">Loading chart...</div>
</Chart>Configuration
Override the default severity in your ESLint config:
// eslint.config.js
import astroDoctorPlugin from '@santi020k/eslint-plugin-astro-doctor'
export default [
astroDoctorPlugin.configs.recommended,
{
rules: {
'astro-doctor/require-island-fallback': 'error', // or 'warn' or 'off'
},
},
]Or in your doctor.config.ts:
export default {
rules: {
'astro-doctor/require-island-fallback': 'error',
},
}All rules
astro-doctor/no-client-load-overuseastro-doctor/use-astro-imageastro-doctor/require-image-dimensionsastro-doctor/no-missing-altastro-doctor/no-set-htmlastro-doctor/no-public-secret-envastro-doctor/prefer-class-listastro-doctor/no-blocking-scriptastro-doctor/no-unprocessed-script-surprisesastro-doctor/no-missing-langastro-doctor/require-island-fallback(this page)astro-doctor/no-process-envastro-doctor/prefer-content-collectionsastro-doctor/no-disabled-origin-checkastro-doctor/no-insecure-session-cookieastro-doctor/no-open-allowed-domainsastro-doctor/prefer-env-schemaastro-doctor/prefer-pnpmastro-doctor/require-action-input-schemaastro-doctor/require-client-router-script-lifecycleastro-doctor/require-content-config