eslint icon indicating copy to clipboard operation
eslint copied to clipboard

Add eslint-plugin-nuxt to default config

Open TheAlexLichter opened this issue 5 years ago • 2 comments

TheAlexLichter avatar May 22 '20 12:05 TheAlexLichter

Related issue: nuxt/eslint-plugin-nuxt#110

nathanchase avatar Jun 21 '20 13:06 nathanchase

I would think that @nuxtjs/eslint-module could be the single point of dependency, automatically including:

"@nuxtjs/eslint-config": "^3.0.0", "babel-eslint": "^10.1.0", "eslint": "^7.2.0", "eslint-plugin-nuxt": "^1.0.0",

Then, you'd just have a single dependency in a create-nuxt-app. So instead of:

"devDependencies": {
    "@nuxtjs/eslint-config": "^3.0.0",
    "@nuxtjs/eslint-module": "^2.0.0",
    "babel-eslint": "^10.1.0",
    "eslint": "^7.2.0",
    "eslint-plugin-nuxt": "^1.0.0",
  }

You'd just have:

"devDependencies": {
    "@nuxtjs/eslint-module": "^2.0.0",
  }

or whichever package is the most encompassing as "Nuxt recommended defaults"?

nathanchase avatar Jun 21 '20 14:06 nathanchase

eslint-plugin-nuxt's rules are mostly for Nuxt 2 and most of them are no longer useful in Nuxt 3. We had the new @nuxt/eslint-plugin introduced in #332, which is included in the new eslint-config. Consider this is resolved.

antfu avatar Mar 19 '24 13:03 antfu