Skip to content

Commit 40ee74a

Browse files
authored
fix: disable antfu/no-top-level-await for Astro (#638)
1 parent 3f32478 commit 40ee74a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/configs/astro.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ export async function astro(
4343
name: 'antfu/astro/rules',
4444
processor: 'astro/client-side-ts',
4545
rules: {
46+
// Astro uses top level await for e.g. data fetching
47+
// https://docs.astro.build/en/guides/data-fetching/#fetch-in-astro
48+
'antfu/no-top-level-await': 'off',
49+
4650
// use recommended rules
4751
'astro/missing-client-only-directive-value': 'error',
4852
'astro/no-conflict-set-directives': 'error',

0 commit comments

Comments
 (0)