Closed meirroth closed 1 month ago
See dependency added as main and not as dev
This is working as expected, as the script will add the module where nuxt
is. In the starter template nuxt
is put in depdendencies
instead of devDeps
https://github.com/nuxt/cli/blob/b9868fedcb4545b9f84372005801ba86d4ff1b46/src/commands/module/add.ts#L64-L67
See missing eslint dependency
That's a good point. Let me see how we can improve that
See missing eslint.config.mjs
This happens in the module, you need to run nuxi prepare
or nuxi dev
once to have it
See dependency added as main and not as dev
This is working as expected, as the script will add the module where
nuxt
is. In the starter templatenuxt
is put indepdendencies
instead ofdevDeps
Any idea why the starters have these dependencies not in dev?
See missing eslint dependency
That's a good point. Let me see how we can improve that
👍
See missing eslint.config.mjs
This happens in the module, you need to run
nuxi prepare
ornuxi dev
once to have it
Do you think this is clear to other users or should we update documentation to mention this?
Any idea why the starters have these dependencies not in dev?
I don't. But in an app I guess deps and devDeps do have much difference. If you want to discuss, I suggest you to create an issue in the template repo instead.
Do you think this is clear to other users or should we update documentation to mention this?
Totally - PR welcome if you want to help on that. Thanks
I don't. But in an app I guess deps and devDeps do have much difference. If you want to discuss, I suggest you to create an issue in the template repo instead.
https://github.com/nuxt/starter/issues/723
Totally - PR welcome if you want to help on that. Thanks
@antfu Thanks for merging! Want to keep this one open for the missing eslint
dependency issue? Let me know if I can help.
I am not sure what it's the best way to do it. The nuxi command does not support custom command yet, so I guess it might be better to just document it and ask users to install?
At this point, the Quick Setup may not be "quicker" because you have to run two commands. Perhaps we should remove this section and stick with the manual setup until the cli adds this feature. Thoughts?
BTW, I recently binge-watched your 'learn.nuxt.com' stream series and learned a lot! Thank you very much 🙏.
@antfu bump in case you missed my comment.
Environment
StackBlitz: https://nuxt.new/s/v3
Package Manager: npm@10.2.3
Package
@nuxt/eslint
Reproduction
Open https://nuxt.new/s/v3 and run
npx nuxi module add eslint
✔ See module added ❌ See dependency added as main and not as dev ❌ See missingeslint
dependency ❌ See missingeslint.config.mjs
Describe the bug
The Quick Setup sections assumes the provided command will setup all for you, but it misses correctly adding dependacy under
devDependencies
, it missed addingeslint
, and it doesn't generateeslint.config.mjs
like it states it would.Without these things, the manual setup should be faster and therefore the recommended way to get started.
If the above is an issue with
nuxi
or a limitation, I think we should update the docs to clarify these things. I'd be willing to open a PR if this meets the projects goals.Additional context
No response
Logs
No response