Skip to content

How to enable @typescript-eslint rules #544

Closed Answered by zecka
zecka asked this question in Q&A
Discussion options

You must be logged in to vote

Finally make it work by adding languageOptions.parserOptions.projectto eslint config

// @ts-check
import withNuxt from './.nuxt/eslint.config.mjs'

export default withNuxt(
  // Your custom configs here
).prepend({
  languageOptions: {
    parserOptions: {
      project: './tsconfig.json',
    }
  },
  rules: {
    '@typescript-eslint/no-floating-promises': 'error',
  }
})

Fixed branch on repository: https://github.com/zeckaissue/nuxt-eslint-test/tree/discussion/nuxt-eslint-544-FIX

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zecka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant