Sharing checks
Checks are best shared using packages.
We recommend prefixing packages intended for open source or community use with commonality-checks
. This will allow for a shorter path when configuring them in your project configuration.
Static checks
Checks that don’t require any configuration can be added to your project by adding the them to directly to your project configuration file.
We recommend exporting static checks as separate entry points in your package.json.
Checks can then be configured using the full package name or shorthand if prefixed with commonality-checks
.
Composed checks
Checks that are designed to be configured by the user can be exported as functions.
These checks can be exported from as named exports from a single file.
Composed checks can then be exported from package’s main
entry point.
Developers can then configure these checks and export them as static checks locally in their projects or as packages to standardize a toolchain across an organization.
Was this page helpful?