[ts-transformers] Improve position of static properties and add blank line
- Dominant language
- TypeScript
- Stars
- 21.8k
- Forks
- 1.1k
- Avg merge
- 18h 25m
- Merged PRs (30d)
- 2
Description
### Input
```ts
class MyElement extends LitElement {
static styles = css`...`;
@property()
foo;
}
```
### Current output
```js
class MyElement extends LitElement {
static properties = {
foo: {},
}
static styles = css`...`;
}
```
### Desired output
```js
class MyElement extends LitElement {
static styles = css`...`;
static properties = {
foo: {},
}
}
```
Specifically, we should:
- When creating a new static properties field, put it below the last existing static field, instead of at the top of the class.
- Add a blank-line placeholder to new static properties fields.
Contributor guide
Research direction
Start in the ts-transformers implementation that creates static properties fields and compare its output with the provided input, current output, and desired output. Done means new fields are placed below the last existing static field and include a blank line before them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100