I am developing a firefox addon now. I have tried a lot of IDEs for JavaScript and finally ended up with JetBrains WebStorm. But when I opened my project(about 1000 lines) in WebStorm the first time it showed me about 500 warnings. The most of the warnings are "Unresolved function or method" and "Unresolved variable or type".
For example this 2 lines contain 4 warnings:
let sss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService);
sss.loadAndRegisterSheet(uri, sss.AUTHOR_SHEET);
- getService (Unresolved function or method)
- nsIStyleSheetService (Unresolved variable)
- loadAndRegisterSheet (Unresolved function or method)
- AUTHOR_SHEET (Unresolved variable)
For now I just disabled all this warnings. But maybe it's not the best way to handle the problem? There are "libraries" in WebStorm for jQuery, Ext JS, Prototype, Dojo and other. And a custom JavaScript library can be added. Is there a way to add/create such a custom library? Or is there another way to handle all this warning not disabling them at all?
P.S. There's Komodo IDE that provides such autocompletions:

and I thought that maybe someone extracted it from Komodo IDE and added to WebStorm as a library.
/* global MY_GLOBAL */comment("a directive for telling JSHint about global variables that are defined elsewhere"). It can help a little. But for some reason it doesn't understand/* exported EXPORTED_LIB */comment("a directive for telling JSHint about global variables that are defined in the current file but used elsewhere"). - traxium