@droneey/devkit-ts-syncpack
v1.33.0
Published
Shared Syncpack configuration: the order of the fields in package.json and the version ranges of the dependencies.
Maintainers
Readme
@droneey/devkit-ts-syncpack
Shared Syncpack configuration: the order of the fields in every package.json, the alphabetical fields, and caret ranges for the dependencies of the project. Scripts keep the order their author chose.
Installation
bun add -d @droneey/devkit-ts-syncpack syncpackCreate .syncpackrc.mjs in your project root:
export { config as default } from '@droneey/devkit-ts-syncpack';A repository of packages takes packages instead:
export { packages as default } from '@droneey/devkit-ts-syncpack';On top of config, it holds:
- every package of the repository at one version: each manifest's
versionis read as one custom type undersameRange, so a package left behind is aSameRangeMismatch; - the repository's own packages (
$LOCAL) taken asworkspace:*in dependencies and dev dependencies; - peer dependencies left at their wider ranges.
Scripts
{
"scripts": {
"packages:check": "syncpack lint && syncpack format --check",
"packages:fix": "syncpack fix && syncpack format"
}
}syncpack lint checks versions and ranges; syncpack format --check checks the field order. Both run in check.
