The command to install the package is always identical regardless of the package purpose.
Some packages are indisputably better to be installed as devDependency. This helps developers avoid adding a normal dependency by mistake which may result in said dependency pulled by all of its users. Suboptimal to say the least.
Moreover, call me stupid but I never remember the command to install devDependencies on npm. I end up installing it normally and manually fixing package.json 🤦🏻♂️
To avoid this, we could:
- Maintain a list of popular packages which are extremely likely to be installed as a devDependency, like eslint, vite, esbuild, oxfmt, typescript, and more.
- Scan package's README for hints; in many cases install command is there, and if the maintainers themselves are suggesting installation as devDependency, then we could do the same as well.
What do you think?
The command to install the package is always identical regardless of the package purpose.
Some packages are indisputably better to be installed as devDependency. This helps developers avoid adding a normal dependency by mistake which may result in said dependency pulled by all of its users. Suboptimal to say the least.
Moreover, call me stupid but I never remember the command to install devDependencies on npm. I end up installing it normally and manually fixing package.json 🤦🏻♂️
To avoid this, we could:
What do you think?