Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app-version doesn't support AngleBracket notation #260

Open
BryanCrotaz opened this issue Apr 15, 2020 · 6 comments
Open

app-version doesn't support AngleBracket notation #260

BryanCrotaz opened this issue Apr 15, 2020 · 6 comments

Comments

@BryanCrotaz
Copy link

No description provided.

@rwjblue
Copy link
Member

rwjblue commented Apr 16, 2020

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

  • what are you trying to do?
  • what doesn't work?
  • what versions of ember-cli-app-version / ember-source / ember-cli are you using?

@rwjblue
Copy link
Member

rwjblue commented Apr 16, 2020

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
Copy link
Author

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)

Copy link
Member

rwjblue commented Apr 16, 2020

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
Copy link
Author

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

@BryanCrotaz
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants