Open gregveres opened 2 years ago
This is a fairly common convention for Nx. Since it can support multiple frameworks at the same time, the root eslintrc.json should not have framework-specific overrides. You could create a custom generator that invokes @nx-plus/vue:lib
and deletes those additions, that way you wouldn't have to manually add them.
Description
I have been using Nx-plus/vue for a couple of weeks now. Due to wanting so much of my app to dynamic load via the router, I now have ~50 library projects and I expect it to grow considerably. I am finding that every time I create a new library project, I have to edit the .eslintrc.json file to modify the first line:
I remove the presets so that it reads:
The reason I do that is because I have those presets loaded in my root level .eslintrc.json file, along with a number of overrides for different file types. When I leave these presets in the library level config file, then all of the root level overrides get thrown out because the re-inclusion of the presets override my overrides.
I can continue to remove the presets from the library file each time I create a library, but it is getting tedious. I was wondering if there was a reason why you include these at the library level.
Motivation
to cut down the number of steps that I have to take each time I create a library project.
Suggested Implementation
just output the extends line with the reference to the root level .eslintrc.json file.
Alternate Implementations
some sort of elaborate configuration of defaults so that each project can tweak exactly which files will be created when they run the generator.