This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 248872

Summary: Add unused module hint
Product: javascript Reporter: Vladimir Riha <vriha>
Component: Node.jsAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal CC: tmysik
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

Description Vladimir Riha 2014-11-24 22:09:36 UTC
If you are loading module like

var User = require("./UserModel");

in "top" scope in file (outside of any function), the "unused variable" hint does not work. It is fine in client side JS, but in NodeJS (I think) if the "User" is not used in given file, it cannot be used anywhere else (as it is not exported). Would it be possible to have "unused variable" hint for such unused loaded module?

Thank you