Closed mrleblanc101 closed 8 months ago
It should be nice to reference that config @nuxt/eslint-config
for sure.
I didn't find a running config before reading your post here.
Instead of babel parser you could try vue-eslint-parser
from eslint-plugin-vue
I manage to have a minimal config running for typescript with that .eslinrc.json
:
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:vue/vue3-recommended",
"@nuxt/eslint-config"
],
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"root": true
}
Am I the only one finding configuring ESLint in Nuxt 3 very confusing ? I'm trying to setup eslint for a JavaScript project (no Typescript), and I can't find reliable documentation. Every
.eslintrc
file i find useparser: '@typescript-eslint/parser'
, but I can't make it work with@babel/eslint-parser
nuxt.config.ts
tonuxt.config.js
.tsconfig.json
file..eslintrc
with a basic config like this:But i get this error:
Second, shouldn't the nuxt 3 version of this module be in the
@nuxt
namespace instead of the@nuxtjs
namespace ? Because the@nuxtjs/eslint-config
and@nuxtjs/esling-config-typescript
package are meant for Nuxt 2 and the Nuxt 3 version are called@nuxt/eslint-config
and@nuxt/eslint-config-typescript
.