EsLint module Layers support
Dominic-Marcelino opened this issue · 5 comments
Describe the feature
In order to improve the DX on extending projects it would be great, if the new eslint-module would read the extending layers eslint.config.mjs
config and merge it with the own layers config.
Additional information
- Would you be willing to help implement this feature?
- Could this feature be implemented as a module?
Final checks
- Read the contribution guide.
- Check existing discussions and issues.
It already does - if anything missing, please provide a minimal reproduction
I've recreated a reproduction repo: https://stackblitz.com/edit/nuxt-starter-ofcsfa (same repo as #406 )
It doesn't seem to work for me. I've added the rule no-trailing-spaces
to layer1
but it doesn't get included on Nuxt-app
.
(I know the rule is deprecated and needs to be updated to @stylistic/no-trailing-spaces
, but for testing I even tried with the basic one)
It downs to eslint - that usually assumes you only have one eslint config in our project root.
In that case, I'd suggest you give a try of using extend
from https://github.com/antfu/eslint-flat-config-utils#extend and create a root eslint-config to proxy those configs of the subdirectory. This shouldn't be in Nuxt's scope.
In that case, I'd suggest you give a try of using
extend
from https://github.com/antfu/eslint-flat-config-utils#extend and create a root eslint-config to proxy those configs of the subdirectory. This shouldn't be in Nuxt's scope.
Thanks, really appreciate. I'll have a look into it!
I am builidng a component library and adding such feature would help the end users integrate the library's eslint config without an extra step.
Maybe users can opt-in/out using a module option.
I think the expectation is that this functionality would be the same as extending nuxt.config
(at least that is why I assumed when reading the module supports layers).