Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
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 776,865 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.