nuxt / eslint

Collection of ESLint-related packages for Nuxt
https://eslint.nuxt.com
MIT License
549 stars 66 forks source link

`typescript-eslint` plugin version confilict. #330

Closed Jimmyzm closed 7 months ago

Jimmyzm commented 8 months ago

Here is my eslint config:

{
  extends: [
    'eslint:recommended',
    'plugin:@typescript-eslint/recommended',
    'plugin:vue/vue3-recommended',
    '@nuxt/eslint-config',
    'prettier'
  ],
  parser: 'vue-eslint-parser',
  parserOptions: {
    parser: '@typescript-eslint/parser',
    ecmaVersion: 'latest',
    sourceType: 'module'
  },
  plugins: ['@typescript-eslint'],
  root: true
}

At first I just thought @nuxt/eslint-config was config-only for eslint, but when I upgrade typescript-eslint to v7, the eslint started to report error:

ESLint couldn't determine the plugin "@typescript-eslint" uniquely.

I just found @nuxt/eslint-config contained typescript-eslint@6.x, what should I do if I want to use both typescript-eslint@v7 and @nuxt/eslint-config?

shinGangan commented 8 months ago

Hi @Jimmyzm !

I think this problem is caused by typescript-eslint, not @nuxt/eslint-config.

Better to look for issues on the typescript-eslint side about the coexistence of typescript-eslint@6.x(@typescript-eslint/*@6.x)@typescript-eslint/*@7.x(not typescript-eslint@7.x) You might come across some hints. Also, since typescript-eslint@v7.x is a separate package, it might be better to ask them to check whether they are referring to @typescript-eslint/*@v7.x or typescript-eslint@v7.x.

Related

Below is the announcement about v7 of typescript-eslint. You may find a solution here.

https://typescript-eslint.io/blog/announcing-typescript-eslint-v7/

Jimmyzm commented 8 months ago

@shinGangan Thanks for the reply, what I mean is the @typescript-eslint/eslint-plugin package. I just found this Link. It said that The best course of action in this case is to wait until your dependency releases a new version with support for our latest versions. So is there any schedule for upgrading to the latest @typescript-eslint/eslint-plugin?

francisashley commented 7 months ago

Please can we update to v7. A dependancy of v6 is currently throwing an annoying error on every lint:

Screenshot 2024-03-02 at 07 57 33