Open
Description
It would be nice to have unused detection expanded, capable of detecting unused methods, exports, etc.
Code Example
Shape.js
class Shape {
constructor() {
this.color = 'red';
}
colorLog() {
console.log(this.color);
}
}
export default Shape;
Circle.js
import Shape from "./Shape";
class Circle extends Shape {
constructor() {
super();
// FIXME: description should show as unused in VSCode, as it does in WebStorm.
this.description = 'A circle shape';
}
// FIXME: circleLog should show as unused in VSCode, as it does in WebStorm.
circleLog() {
// NOTE: both VSCode and WebStorm have detected an unused variable.
const num = 2;
// NOTE: colorLog is being used, so no unused code errors in Shape.js file.
super.colorLog();
}
}
// FIXME: export should show as unused in VSCode, as it does in WebStorm.
export default Circle;
VSCode Screen
WebStorm Screen