Add a semicolon to ReturnStatement
- Dominant language
- TypeScript
- Stars
- 5.3k
- Forks
- 363
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 3
Description
Because I used eslint rules
`
"rules": {
"semi": [1, "never"]
}
`
'return do something' is printed as 'return do something ;'
I have found it https://github.com/benjamn/recast/blob/master/lib/printer.ts#L643
`
"parts.push(";");"
`
Would you add optional ?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at lib/printer.ts around line 643, where ReturnStatement output adds a semicolon. Review nearby printer behavior and available options, then determine how an optional semicolon setting should affect this output. Done means return statements can be printed without a semicolon for the reported eslint semi-never case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100