Skip to content

Commit e5b47de

Browse files
committed
fix(config): include $fetch as the global, close #371
1 parent 46108b2 commit e5b47de

File tree

1 file changed

+10
-0
lines changed
  • packages/eslint-config/src/flat/configs

1 file changed

+10
-0
lines changed

packages/eslint-config/src/flat/configs/nuxt.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ export default function nuxt(options: NuxtESLintConfigOptions): FlatConfigItem[]
1616

1717
const configs: FlatConfigItem[] = []
1818

19+
configs.push({
20+
name: 'nuxt/configs',
21+
languageOptions: {
22+
globals: {
23+
// Nuxt's runtime globals
24+
$fetch: 'readonly',
25+
},
26+
},
27+
})
28+
1929
if (fileSingleRoot.length)
2030
configs.push({
2131
name: 'nuxt/vue/single-root',

0 commit comments

Comments
 (0)