Reputation: 107
is there any available intellisense for Webstorm for Sails.js app? In all my controllers, I get message that the model is undefined, even though it works perfectly. The same goes with calling services.
Upvotes: 5
Views: 2102
Reputation: 270
i know this is a little old, but what i ended up doing was first naming all "modules.exports" definitions with the same name of the file (like a class name).
So if i have a file named UserController.js, i would start it with:
var UserController = module.exports = {}
Next, you need to go to the preferences page and hook up your sails api folder as a library.
You will notice that the icon for api files now has some books on them.
Also, make sure that your "Node.js Globals" is enabled as well as the "node_modules" folder of your sails project. that will enable code completion on common node.js stuff and on sails dependencies (waterline, ejs, etc).
Hope that helps and vote for official support!
Upvotes: 6
Reputation: 93728
This framework is not currently supported - please vote for http://youtrack.jetbrains.com/issue/WEB-11025. And WebStorm doesn't support its way of loading modules and thus can't provide intellisense
Upvotes: 2