Show unused public properties and methods
It would be nice to have unused detection expanded, capable of detecting unused methods, exports, etc. **Code Example** _Shape.js_ ```javascript class Shape { constructor() { this.color = 'red'; } colorLog() { console.log(this.color); } } export default Shape; ``` _Circle.js_ ```javascript 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** <img width="1440" alt="screen shot 2019-01-04 at 9 23 48 pm" src="https://user-images.githubusercontent.com/12591890/50719791-161a2980-1067-11e9-8b16-3f4e4fe6b531.png"> **WebStorm Screen** <img width="1440" alt="screen shot 2019-01-04 at 9 23 07 pm" src="https://user-images.githubusercontent.com/12591890/50719793-1ca8a100-1067-11e9-8c17-071746dd085f.png">
Posted by jabacchetta on Jan 5, 2019, 3:24 AM
Tags
Related issues
- struct's lifetime requirements can be bypassed via covariant field assignment
- Proposal to Reorganize the Moderation Team and Review Moderation Policies
- Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
- proposal: container/...: generic collection types
- Better Custom Endpoint BYOK
- A concrete policy for backward compatibility until Godot 5.0
Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments
github (Other)
struct's lifetime requirements can be bypassed via covariant field assignment
Proposal to Reorganize the Moderation Team and Review Moderation Policies
Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
proposal: container/...: generic collection types
Better Custom Endpoint BYOK
A concrete policy for backward compatibility until Godot 5.0
New MTP models not supported
Tracking: 429 / Capacity Issues
Show unused public properties and methods
It would be nice to have unused detection expanded, capable of detecting unused methods, exports, etc. **Code Example** _Shape.js_ ```javascript class Shape { constructor() { this.color = 'red'; } colorLog() { console.log(this.color); } } export default Shape; ``` _Circle.js_ ```javascript 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** <img width="1440" alt="screen shot 2019-01-04 at 9 23 48 pm" src="https://user-images.githubusercontent.com/12591890/50719791-161a2980-1067-11e9-8b16-3f4e4fe6b531.png"> **WebStorm Screen** <img width="1440" alt="screen shot 2019-01-04 at 9 23 07 pm" src="https://user-images.githubusercontent.com/12591890/50719793-1ca8a100-1067-11e9-8c17-071746dd085f.png">
Comments (0)
No comments yet. Start the discussion.