Is WebStorm this ignorant of Meteor?


#1

In running an inspection on my Meteor project, WebStorm tells me, “Unresolved variable postTravelWizard” on this line (in a .js file):

Template.postTravelWizard.helpers({

Is the problem that WebStorm doesn’t know Meteor well? There is such a “variable” (Template); it’s in the corresponding .html file:


    {{> Template.dynamic template=getStepTemplate}}
    Next


#2

You are correct, that’s something JetBrains should know about i.e. can you maybe create an issue as it seems there’s none yet for that problem in particular.


#3

WebStorm could know Meteor better. For example, WebStorm doesn’t recognize some internal packages, such as Check. Also, you need to manually import external packages (should be fixed in the next version).
But when it comes to templates, it works correctly for me…


#4

I did not looked into it deeper, but by default all these {{#each}} etc includes throw error graphics if we keep space between left brackets and word.
Any fast fix ? I want to still have tag pairing of them, just I would love to have {{ #each ...}} instead of {{#each ...}}


#5

I also get with WebStorm “Unused property currentTemplate” with this:

Template.body.helpers({
    currentTemplate: function () {
      return Session.get('curTemplate');
    }
  });

Baloney! Or should I say, “bologna” - this code works as intended, and if currentTemplate was unused, it wouldn’t.

I think Re# is the cat’s meow, but as far as Meteor support goes, WebStorm needs to be a little meatier.


#6

I saw what you did there! :laughing:


#7

I don’t.

(need 20 characters)