Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
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
For prettier v3+ you need to configure
module.exports = {
// add this
plugins: ['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 657,466 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.