Is there an existing issue for this?
This is a CLI Docs Enhancement, not another kind of Docs Enhancement.
Description of Problem
There's no example, one has to read the entire description to understand the shape and usage (e.g. don't list the dependency in dependencies as well)
Potential Solution
A simple package.json example would remove any doubts about the usage
Docs URL
https://docs.npmjs.com/cli/v11/configuring-npm/package-json#optionaldependencies
Is there an existing issue for this?
This is a CLI Docs Enhancement, not another kind of Docs Enhancement.
Description of Problem
There's no example, one has to read the entire description to understand the shape and usage (e.g. don't list the dependency in
dependenciesas well)Potential Solution
A simple package.json example would remove any doubts about the usage
Docs URL
https://docs.npmjs.com/cli/v11/configuring-npm/package-json#optionaldependencies