Closed as not planned
Description
π Search Terms
desctructure noUnusedLocals rest
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about noUnusedLocals
β― Playground Link
π» Code
function moo() {
const A = {a : 1, b : 2}
// no error on b
const { b, ...rest } = A;
// error on a as expected
const { a } = A
const c = 1;
}
π Actual behavior
no error on an unused local
π Expected behavior
error on any unused local whether a ...rest param is used or not
Additional information about the issue
No response