Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

prettier-plugin-packagejson

> 编程语言
Open source

Prettier plugin for package.json

388 stars0 likes1 views
WebsiteGitHub

About

Prettier plugin for package.json

prettier-plugin-packagejson

A Prettier plugin to sort the keys of a package.json file using sort-package-json.

Installation

npm i -D prettier prettier-plugin-packagejson

For prettier v3+ you need to configure

module.exports = {
  // add this
  plugins: ['prettier-plugin-packagejson'],
}

Options

packageSortOrder

Custom ordering array for package.json fields. This option is passed to sort-package-json's sortOrder option.

Type: string[] Default: [] (uses default sort order from sort-package-json)

Example (.prettierrc):

{
  "packageSortOrder": ["name", "version", "description", "main"]
}

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言