Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
prettier-plugin-packagejson
Advanced tools
Prettier package.json plugin to make the order of properties nice.
The prettier-plugin-packagejson npm package is a plugin for Prettier that formats your package.json file according to a consistent style. It helps maintain a clean and organized package.json file by sorting and formatting its contents.
Sorting dependencies
This feature sorts the dependencies in your package.json file alphabetically, ensuring a consistent order.
{
"dependencies": {
"express": "^4.17.1",
"lodash": "^4.17.21"
}
}
Sorting scripts
This feature sorts the scripts in your package.json file alphabetically, making it easier to find and manage scripts.
{
"scripts": {
"build": "webpack",
"start": "node index.js"
}
}
Sorting other fields
This feature sorts other fields like keywords, contributors, etc., alphabetically to maintain a clean and organized structure.
{
"keywords": [
"formatting",
"prettier",
"plugin"
]
}
The sort-package-json package sorts the keys in your package.json file. It provides similar functionality to prettier-plugin-packagejson by organizing the structure of the package.json file, but it is a standalone tool rather than a Prettier plugin.
The fixpack package is another tool that formats and sorts the fields in your package.json file. It focuses on keeping the package.json file clean and consistent, similar to prettier-plugin-packagejson, but it also includes additional checks for common errors and best practices.
A Prettier plugin to sort the keys of a package.json
file using sort-package-json.
$ npm i -D prettier prettier-plugin-packagejson
FAQs
Prettier package.json plugin to make the order of properties nice.
The npm package prettier-plugin-packagejson receives a total of 810,646 weekly downloads. As such, prettier-plugin-packagejson popularity was classified as popular.
We found that prettier-plugin-packagejson demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.