microsoft / microsoft/TypeScript
Formatter should convert object literal to multiple lines / one line
Open
Nobody has claimed this yet.
Domain: Formatter
Help Wanted
Suggestion
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TypeScript Version: 3.1.0-dev.20180717
Code
const o = { a: 0, b: 1, c: 2 };
Expected behavior:
A refactor exists to convert to:
const o = {
a: 0,
b: 1,
c: 2,
};
and back.
Actual behavior:
No such refactor. I have to do a lot of manual editing of whitespace.
Contributor guide
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
The issue provides a TypeScript object-literal example but names no files, tests, or entry points. Start by locating the existing refactor handling for object literals and its tests, then verify that the refactor converts between one-line and multi-line forms with the shown output and trailing commas.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100