Gathering detailed insights and metrics for prettier-plugin-package-perfection
Gathering detailed insights and metrics for prettier-plugin-package-perfection
Gathering detailed insights and metrics for prettier-plugin-package-perfection
Gathering detailed insights and metrics for prettier-plugin-package-perfection
A Prettier plugin that formats the package.json file by leveraging the prettier-package-json CLI library
npm install prettier-plugin-package-perfection
Typescript
Module System
Min. Node Version
Node Version
NPM Version
55.4
Supply Chain
93.9
Quality
73.8
Maintenance
100
Vulnerability
98.2
License
Shell (83.08%)
Ruby (13.33%)
JavaScript (2.94%)
TypeScript (0.52%)
Dockerfile (0.12%)
Total Downloads
235,263
Last Day
3
Last Week
214
Last Month
1,179
Last Year
14,984
NOASSERTION License
1 Stars
2,035 Commits
2 Watchers
6 Branches
8 Contributors
Updated on Oct 07, 2024
Minified
Minified + Gzipped
Latest Version
1.1.0
Package Id
prettier-plugin-package-perfection@1.1.0
Unpacked Size
25.31 kB
Size
8.33 kB
File Count
6
NPM Version
8.5.0
Node Version
16.14.2
Cumulative downloads
Total Downloads
A Prettier plugin that formats the package.json file by leveraging the prettier-package-json CLI library
The prettier-package-json CLI tool is easily the best package.json
formatter available. However, despite its name, it is not a Prettier plugin. This project brings all of the great prettier-package-json
features to Prettier as a plugin. It sorts in an opinionated style and also has some nifty features that other formatters do not have like:
pre
and post
commands togetherIf you are simply including this library in your project, all you need is a recent version of Node.js. Node.js >14.18.0 is sometimes required and is the only version range we actively support. Albeit, it is highly probable that lower versions will work as well depending on the requirements that this project imports.
The following versions of Node.js and Python are required for development:
Other versions may work, but only the above versions are supported. Most development dependencies are installed automatically by our Taskfile.yml
set-up (even Node.js and Python). Run bash start.sh
to install Bodega (an improved fork of go-task) and run the initialization sequence. The taskfiles will automatically install dependencies as they are needed, based on what development tasks you are running. For more information, check out the CONTRIBUTING.md or simply run:
1npm run help
npm run help
will ensure Bodega is installed and then open an interactive dialog where you can explore and learn about various developer commands.
Prettier plugins are automatically registered if their package name begins with @prettier/plugin-
, prettier-plugin-
, or @<scope>/prettier-plugin-
. Since this package begins with prettier-plugin-
, all you have to do is install it via:
1npm install --save-dev prettier-plugin-package-perfection
That is it! You are good to go. Prettier should automatically pick up on the plugin.
With Prettier, you can create a shared configuration that you can share across all your projects. To do this, you first have to find or create an NPM package that will house your configuration. Then, you have to set the .prettier
key in package.json
equal to the name of your shared configuration NPM package.
You can find an example shared configuration NPM package here (check out the src/main.ts
file to see the magic). All the configuration does is export a typical configuration with module.exports
. This opens the door for dynamically configuring your project's configuration and keeping things DRY.
Specifically including this Prettier plugin in your configuration might look something like this:
1{ 2 "bracketSpacing": true, 3 "printWidth": 120, 4 "quoteProps": "as-needed", 5 "requirePragma": false, 6 "semi": false, 7 "singleQuote": true, 8 "tabWidth": 2, 9 "trailingComma": "none", 10 "useTabs": false, 11 "goTemplateBracketSpacing": true, 12 "overrides": [ 13 { 14 "files": ["*.go.html"], 15 "options": { 16 "parser": "go-template" 17 } 18 }, 19 { 20 "files": ["*.yml"], 21 "options": { 22 "printWidth": 160 23 } 24 } 25 ], 26 "plugins": [ 27 "@prettier/plugin-xml", 28 "prettier-plugin-go-template", 29 "prettier-plugin-ini", 30 "prettier-plugin-organize-imports", 31 "prettier-plugin-package-perfection", 32 "prettier-plugin-properties", 33 "prettier-plugin-sh" 34 ] 35}
Contributions, issues, and feature requests are welcome! Feel free to check the issues page. If you would like to contribute, please take a look at the contributing guide.
Dear Awesome Person,
I create open source projects out of love. Although I have a job, shelter, and as much fast food as I can handle, it would still be pretty cool to be appreciated by the community for something I have spent a lot of time and money on. Please consider sponsoring me! Who knows? Maybe I will be able to quit my job and publish open source full time.
Sincerely,
Brian Zalewski
Below you will find a list of services we leverage that offer special incentives for signing up for their services through our special links:
Copyright © 2020-2021 Megabyte LLC. This project is MIT licensed.
No vulnerabilities found.
No security vulnerabilities found.
Last Day
50%
3
Compared to previous day
Last Week
-5.3%
214
Compared to previous week
Last Month
-23.6%
1,179
Compared to previous month
Last Year
-45.9%
14,984
Compared to previous year