ember-cli / ember-cli-app-version

Adds your app's version to Ember Inspector's Info tab
MIT License
54 stars 46 forks source link

app-version doesn't support AngleBracket notation #260

Open BryanCrotaz opened 4 years ago

rwjblue commented 4 years ago

Can you provide more information? I can't tell from your title what you are referring to. Some info that would be helpful:

rwjblue commented 4 years ago

If you are referring to {{app-version}}, then I think there must be a misunderstanding. That is not a component invocation (it is a helper) and therefore cannot be invoked as <AppVersion />. This isn't a bug, it is a design decision. 😸

I'll leave open to confirm that is what you meant though...

BryanCrotaz commented 4 years ago

Aha. It ended up throwing a template-lint warning - is there any way to hint to template-lint that this is a helper and so shouldn't be warned? (other than putting every helper into every application's template-lint rules)

rwjblue commented 4 years ago

The documentation for the no-implicit-this and no-curly-component-invocation rules show how to do this (via the allow config option):

But as for automatically wiring it up, I think the best we could do is hard code this particular helper (since it is shipped in the default ember new stack). I don't really like doing that, but overtime I think this will resolve itself so it may be a fine stop gap for now.

BryanCrotaz commented 4 years ago

I found the warning confusing because it didn't say where to put the rule - I spent ages fiddling with .eslintrc

BryanCrotaz commented 4 years ago

can this addon modify .template-lintrc.js during installation?