microsoft / microsoft/typespec

Formatter: Format simple model expression into a single line

Open
#1,736 1 comment 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.