Skip to content

Commit

Permalink
fix(config): include $fetch as the global, close #371
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 18, 2024
1 parent 46108b2 commit e5b47de
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/eslint-config/src/flat/configs/nuxt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ export default function nuxt(options: NuxtESLintConfigOptions): FlatConfigItem[]

const configs: FlatConfigItem[] = []

configs.push({
name: 'nuxt/configs',
languageOptions: {
globals: {
// Nuxt's runtime globals
$fetch: 'readonly',
},
},
})

if (fileSingleRoot.length)
configs.push({
name: 'nuxt/vue/single-root',
Expand Down

0 comments on commit e5b47de

Please sign in to comment.