microsoft / microsoft/vscode-json-languageservice
Sorting should respecing `keepLines` option from json formatter
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 326
- Forks
- 145
- Avg merge
- 22h 10m
- Merged PRs (30d)
- 9
Description
Example:
A formatted json before run sorting:
{
"editor.rulers": [ 70, 75 ],
"css.format.braceStyle": "expand"
}
Result after run sorting:
{
"css.format.braceStyle": "expand",
"editor.rulers": [
70,
75
]
}
But I think what most people would expect is:
{
"css.format.braceStyle": "expand",
"editor.rulers": [ 70, 75 ]
}
In another word, it should not sort the content inside an array. What do you guys think?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test entry point is named. Start by locating the JSON formatter's sorting logic and how it handles the keepLines option; use the examples to verify that object properties are sorted while array contents retain their original compact formatting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100