eslint icon indicating copy to clipboard operation
eslint copied to clipboard

Roadmap

Open danielroe opened this issue 2 years ago • 12 comments

The aim for this repo is to be a single source for first-class Nuxt integration with eslint (configuration + plugin(s)). We currently have a few issues.

  • @nuxt/eslint-config is rebuilt for Nuxt 3 support without much opinion and is our preferred choice
  • we still have legacy opinionated @nuxtjs/eslint-config and @nuxtjs/eslint-config-typescript configurations that are in use
  • https://github.com/nuxt/eslint-plugin-nuxt is not yet updated for Nuxt 3

We'll use this issue to track key changes/tasks that need to take place. See also https://github.com/nuxt/eslint-config/issues/240.

### Tasks
- [ ] #298
- [ ] port eslint-plugin-nuxt to nuxt 3 and move here
- [ ] rename repo to nuxt/eslint
- [ ] add more extensive tests for this repo
- [ ] export several presets for less -> more opinionated linting
- [ ] deprecate `@nuxtjs/eslint-config` and `@nuxtjs/eslint-config-typescript` and remove from README

danielroe avatar Aug 09 '23 10:08 danielroe

Hi @danielroe

Thanks for this. I've been struggling today to wrap my head around the Nuxt 3 eslint ecosystem and I am unsure if I should continue trying right now or wait.

In your opinion, is it reasonably possible to have eslint working with Nuxt 3 right now? I say reasonably as I am keen to avoid losing time to trying packages that are not expected to work.

AndrewTannerNA avatar Aug 09 '23 12:08 AndrewTannerNA

Yes, @nuxt/eslint-config should work 👍

danielroe avatar Aug 09 '23 12:08 danielroe

Thanks @danielroe - does it require integrating with any other package (other than eslint)? I am not seeing any eslint related output when running yarn dev.

AndrewTannerNA avatar Aug 09 '23 12:08 AndrewTannerNA

It's an eslint config rather than a Nuxt module so you will need to configure it in your eslintrc. Details should be in the README of this repository.

danielroe avatar Aug 09 '23 13:08 danielroe

I'm unsure what's the difference between this repo and this repo: https://github.com/nuxt-modules/eslint I understand that this repo is a config for eslint, but what is the purpose of the module then ?

Vincent-HD avatar Aug 29 '23 08:08 Vincent-HD

The module enables projects to e.g. fail the build if there are any eslint errors. With the config only, the build would run fine and you'd have to run eslint separately. Just to give an example. The Nuxt module makes eslint influence Nuxt's behavior. Without it you just configure eslint.

dargmuesli avatar Aug 29 '23 15:08 dargmuesli

@dargmuesli ohhh it makes way more sense, thanks ! 👌 It should be fine with a precommit hook for now on my project, but it's good to know 😁

Vincent-HD avatar Aug 29 '23 15:08 Vincent-HD

Any plans not using "no-udef": "off"? That's more maintenance ik, but it seems disabling defining variables in vue components isn't all that safe, imo.

ColtHands avatar Sep 10 '23 18:09 ColtHands

Hello guys is there a rough estimate for the roadmap?

MuhammadM1998 avatar Oct 07 '23 09:10 MuhammadM1998

Since @nuxt/eslint-config is not opinionated, what is your recommendation to add up some recommended rules in TypeScript projects?

Before with @nuxtjs/eslint-config-typescript I got tons of useful linting rules but with @nuxt/eslint-config it complains about nothing anymore. Should we maybe extend plugin:@typescript-eslint/eslint-recommended or something?

It would be nice to add this info to the docs, too. A simple sentence like "If you prefer to have more opionated linting, add ..."

MickL avatar Feb 15 '24 11:02 MickL

Do I need to use typescript-eslint or this plugin include it by default?

thread-koder avatar Feb 21 '24 16:02 thread-koder

@thread-koder, it includes typescript-eslint plugin. Take a look here

maxdzin avatar Feb 22 '24 13:02 maxdzin