Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
xueelf
prettier-plugin-sort
Repository navigation
Code
Issues
Pull requests
5
(5)
Actions
Projects
Security and quality
Insights
More
items
Releases
v0.2.0
v0.2.0
Compare
Choose a tag to compare
Sorry, something went wrong.
Filter
Loading
Sorry, something went wrong.
Uh oh!
There was an error while loading.
Please reload this page
.
No results found
xueelf
released this
20 May 02:51
·
62 commits
to master since this release
v0.2.0
28f1e27
New
package.json 排序行为完整对齐 sort-package-json,字段级差异化处理字符串数组:keywords、files 只去重保留原始顺序;bundledDependencies、extensionPack 等先去重再排序;workspaces 数组不排序。
Added
scripts 和 betterScripts 子键排序:支持 pre/post 生命周期包围(prebuild → build → postbuild)与
:
命名空间递归分组。
exports 子键排序:
.
开头路径优先、条件按字母序排列且
default
置底,嵌套 export 对象递归处理。
Fixed
JSON.stringify 后的换行风格与原始文件保持一致,兼容 CRLF。
README 中 package.json 排序规则描述与实现同步。
Improved
detectGroup 中的正则常量提升到模块级,sortObjectKeysByOrder 的字段索引 Map 预计算缓存,减少运行时开销。
源码注释重新润色,消除机翻痕迹。
全局变量名去缩写:pkg/out/deduped/uniq/devDeps 等替换为完整语义名。
Removed
bundledDependencies / bundleDependencies 从依赖表字段列表移除(它们在 npm 中是字符串数组,非键值映射)。
You can’t perform that action at this time.