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 - Add unused module hint
Summary: Add unused module hint
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Node.js (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-24 22:09 UTC by Vladimir Riha
Modified: 2014-11-24 22:09 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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