Roadmap
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-configis rebuilt for Nuxt 3 support without much opinion and is our preferred choice- we still have legacy opinionated
@nuxtjs/eslint-configand@nuxtjs/eslint-config-typescriptconfigurations 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
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.
Yes, @nuxt/eslint-config should work 👍
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.
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.
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 ?
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 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 😁
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.
Hello guys is there a rough estimate for the roadmap?
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 ..."
Do I need to use typescript-eslint or this plugin include it by default?
@thread-koder, it includes typescript-eslint plugin. Take a look here