Unused local variable inspection with ES6 object destructuring

I've been using object destructuring more and more in my js code, both for ES6 style named imports or just misc usages, two examples being:

import { namedExport1, namedExport2 } from "module";

const { prop1, prop2 } = this.props;

 

It saddens me that the unused local variable detection doesn't pick up when I don't use one of these variables, say I no longer use namedExport2 above but forget to remove it from the import line. Is there any way to enable this, or could I request it as a future feature? I'm sure I could set up some other linter to detect this but I've been used to the R# support for similar things :)

Please sign in to leave a comment.