- Ensure no package can ever depend on an
application
- Ensure
data
packages can’t depend onui
packages - Ensure
config
packages can only depend on otherconfig
packages.
Configuring constraints
Constraints are defined as a constraint object in your project configuration file and can be used toallow
and disallow
packages matching a selector.
Here’s an example of a configuration that enforces the constraints above:
.commonality/config.json
Validating constraints
You can view the status of your constraints by running the constraint command.Precedence
A constraint object can contain bothallow
and disallow
constraints.
When both are present, disallow
constraints will be evaluated first.