fixUnusedIdentifiers removes unused function parameter in ES6 syntax
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 238
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
**Description**
Version: ^12.0.0
When I call fixUnusedIdentifiers(), part of the function argument is removed which in ES6 syntax.
**To Reproduce**
```ts
// before
testUnUsedObject={
beforeFetch1(a, b) {
return b
},
beforeFetch2: (a, b) => {
return b
},
}
// after call fixUnusedIdentifiers()
testUnUsedObject={
beforeFetch1(b) {
return b
},
beforeFetch2: (a, b) => {
return b
},
}
```
**Expected behavior**
beforeFetch1 and beforeFetch2 behave the same
Contributor guide
Research direction
Start by locating fixUnusedIdentifiers and reproduce the issue with the beforeFetch1 method and beforeFetch2 arrow-function examples from the report. Compare how unused parameters are handled for each ES6 form; done means both forms preserve equivalent behavior after the fix, with the provided reproduction covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100