Add `err` and/or `opts` to the no-param-reassign exclusions?
- Dominant language
- JavaScript
- Stars
- 148k
- Forks
- 26.6k
- PR merge metrics
- No merged PRs in 30d
Description
Hey there.
Most frequent i have problem with this rule. And specifically in cases of `options`, `opts` and `err`. I also seen in #1089 that this rules is disabled for different reasons. What's your thoughts? Could you consider adding `opts` and `err`?
I know that there is a bit better and more proper way for adding to the error instance, for example creating whole new error class based on the original one. But there is simple things like adding some single metadata property.
In my case such metadata is `err.commandArgv` and `err.commandName` where `commandName` isn't exactly the terminal/unix one, but command of some cli - for example `mycli hello` so `err.commandName` will be `hello` regardless what that command does.
Contributor guide
No contributing guide indexed for this repository
Research direction
Review the no-param-reassign rule configuration and the discussion referenced in #1089. Determine whether `opts` and `err`, either individually or together, should be excluded, and confirm the expected behavior for metadata assignments such as `err.commandArgv` and `err.commandName`; completion requires a maintainer-approved decision and corresponding change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100