@nice-move/prettier-plugin-package-json
v0.9.0
Published
A `prettier` plugin to make `package.json` prettier
Downloads
4,437
Maintainers
Readme
@nice-move/prettier-plugin-package-json
A prettier plugin to make package.json
prettier.
Read about npm-package.json.
Installation
npm install prettier @nice-move/prettier-plugin-package-json --save-dev
Usage
// .prettierrc.json
{
"overrides": [
{
"files": "package.json",
"options": {
"parser": "package-json"
}
}
]
}
prettier --write **/package.json
Feature
- Normalize by normalize-package-data and normalize-package-bin
- Sort
package.json
fields in a preset order - Expand
author
andcontributors
fields into objects - Remove deprecated fields like
preferGlobal
,engineStrict
- Merge
bundleDependencies
intobundledDependencies
- Rename
esnext
/jsnext
tomodule
, renametypings
totypes
- Differentiate
UNLICENSED
andUnlicense
license byprivate
- Remove leading
./
frommain
/files[n]
- Normalize
engines.*
versions - Normalize
repository
fields - Set
version
when needed - More ...