Performancewarn by default
astro-doctor/no-client-load-overuseno-client-load-overuse
Prefer client:idle or client:visible over client:load for interactive islands.
Why
client:load hydrates the component immediately, blocking the main thread during page startup. client:idle waits for the browser to be idle; client:visible waits until the element enters the viewport — both give the critical path a head start.
Examples
Incorrect
Uses client:load unnecessarily
---
import Counter from '../components/Counter'
---
<Counter client:load />Correct
Uses client:idle (below the fold) or client:visible
---
import Counter from '../components/Counter'
---
<!-- Below-the-fold component: hydrate when browser is idle -->
<Counter client:idle />
<!-- Only visible when scrolled into view -->
<Counter client:visible />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/no-client-load-overuse': 'error', // or 'warn' or 'off'
},
},
]Or in your doctor.config.ts:
export default {
rules: {
'astro-doctor/no-client-load-overuse': 'error',
},
}All rules
astro-doctor/no-client-load-overuse(this page)astro-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-fallbackastro-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