eslint-config-callstack
eslint-config-callstack copied to clipboard
fix: add missing ignoreRestSiblings to allow to omit values
Summary
Add missing ignoreRestSiblings to allow to omit values in destructuring assignment.
Without ignoreRestSiblings: true this code fails:
const { modalDialogs: _, ...rest } = (params ?? {}) as InternalParams;
// error '_' is assigned a value but never used @typescript-eslint/no-unused-vars
Edit:
ignoreRestSiblings: true will not require values to have to be renamed to ^_, eg:
const { modalDialogs, ...rest } = (params ?? {}) as InternalParams;
will pass w/o errors.
Will this ignore unused props when being unused as well?
function Component({ prop1, prop2 }: Props) {
return prop1
}