Open
Description
Follows #316
ATM we specify @types/*
as peerDependencies. With the new behaviour added to package managers for auto installing peerDependencies, this approach adds unwanted behaviour for users not using TypeScript as part of their CI toolchain.
For that reason we should enforce following patterns when specifying dependencies:
If package has production dependency ( peer or prod ) which doesn't ship types as part of the package (eg react
, react-dom
) a @types/*
package needs to exists as peerDependency with additional peerDependenciesMeta
definition that marks this type package as optional.
Implementation:
- add this functionality to
@nx/dependency-check
rule or - handle on our own via either
- custom lint rule
- nx sync generator
Related issues:
Metadata
Metadata
Assignees
Labels
No labels