Rudo Kemper
Does anyone have a great eslint+typescript Nuxt 3 setup?
I've been trying to set up eslint and typescript for my Nuxt 3 projects for a while now and not getting this right. There is so much conflicting information online. Does anyone have a great working example where eslint is able to lint with typescript (in js/ts/vue)?
For posterity, here is my setup...
In my latest attempt I've installed
@eslint/js
, @nuxt/eslint
, @typescript-eslint/parser
, eslint
, eslint-config-flat-ignore
, and typescript
.
My tsconfig.json
is standard:
My eslint.config.js
looks like this:
In my nuxt.config.ts
I have added @nuxt/eslint
to modules.
Typescript works just fine in VScode but none of the rules are applied when linting.
If I try to add e.g. @typescript-eslint/esplint-plugin
to my eslint config, I get a not super helpful complaint:
"A config object is using the "extends" key, which is not supported in flat config system."
--
Any help appreciated, either links to working eslint+typescript Nuxt3 repos, or specific pointers on what might be going wrong. Thanks!10 replies