Please describe what the rule should do:
- Prevent useless rest/spread
- Prevent using an implicit shallow clone when a deep clone would be more appropriate and more explicit
What category of rule is this? (place an "X" next to just one item)
[ ] Enforces code style
[x] Warns about a potential error
[ ] Suggests an alternate way of doing something
[ ] Other (please specify:)
Provide 2-3 code examples that this rule will warn about:
// bad
const options = {
params: { ...payload }
)
// good
const options = {
params: payload
)
const options = {
params: cloneDeep(payload)
)
Why should this rule be included in ESLint-plugin (instead of a Eslint)?
N/A it’s an addition to @mysticatea/no-useless-rest-spread