Prettier plugin for clean and meaningful formatting of package.json files. Version 0.3.0 is the latest stable release. It sorts keys in a logical order, formats JSON consistently, and integrates seamlessly with Prettier. No dependencies. Actively maintained as part of the tunnckoCore opensource monorepo.
npm install prettier-plugin-pkgjsonVerified import paths — ran on the pinned version, not inferred.
Example .prettierrc configuration to enable the plugin and format package.json files.
Update Prettier to >=2.0.0.
Use only for package.json; for other JSON files use other plugins.
Add "prettier-plugin-pkgjson" to plugins array in Prettier config.
Run npm install prettier-plugin-pkgjson --save-dev
Ensure prettier-plugin-pkgjson is listed in .prettierrc plugins array, not in ESLint config.
Use Node.js >=10.13; if issue persists, check that Prettier resolves the plugin correctly.
No dependency data recorded yet.