microsoft / microsoft/typespec
Formatter: Format simple model expression into a single line
Open
compiler:core
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
Specially when used inside decorators it can be anoyoing that it creates new lines when it is a very simple format
```
@query({
format: "multi",
})
// be good to stay
@query({query: "multi"})
```
As a good start we could have those rule to decide if it should be inline:
- single property
- not overflowing the max line length
- model expression only? (no named model?)
Contributor guide
Assessment
This issue has not been assessed yet.