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);
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.
I have solved the issue by cloning the repository and adding the lib/sdk directory as a new library under Settings->Languages & Frameworks->JavaScript->Libraries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With