JSPM

prettier-plugin-pkgsort

0.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3223
  • Score
    100M100P100Q122383F
  • License MIT

Use prettier-package-json to sort your package.json.

Package Exports

  • prettier-plugin-pkgsort

Readme

prettier-plugin-pkgsort

NPM version

Use prettier-package-json to sort your package.json.

💎 Features

  • Consistent key order
  • Sensibly sorted scripts
  • Expand/contract author, contributors, and maintainers
  • Filter and sort files field
  • Powered by prettier-package-json

📦 Installation

$ npm install prettier-plugin-pkgsort -D
$ yarn add prettier-plugin-pkgsort -D
$ pnpm add prettier-plugin-pkgsort -D

🚀 Usage

// .prettierrc.js
module.exports = {
  plugins: [
    // Add this plugin to your prettier config
    "prettier-plugin-pkgsort",
  ],
};

🎶 Options

// .prettierrc.js
module.exports = {
  pkgsortExpandUsers: true, // Expand users in author, contributors, and maintainers
  pkgsortKeyOrder: [
    "name",
    "description",
    // ...
  ], // Order of keys
};

📝 License

MIT. Made with ❤️ by Ray