Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

no-curly-component-invocation gives wrong advice for yielded blocks #598

Open
elwayman02 opened this issue Feb 28, 2020 · 1 comment
Open

Comments

@elwayman02
Copy link
Contributor

Take the following example from the ec-addon-docs Quickstart guide:

{{#docs-viewer as |viewer|}}
  {{#viewer.nav as |nav|}}
    {{nav.item "Introduction" "docs.index"}}
  {{/viewer.nav}}

  {{#viewer.main}}
    {{outlet}}
  {{/viewer.main}}
{{/docs-viewer}}

The linter will spit out the following error:

error You are using the component {{viewer.main}} with curly component syntax. You should use <Viewer.Main> instead. If it is actually a helper you must manually add it to the 'no-curly-component-invocation' rule configuration, e.g. 'no-curly-component-invocation': { allow: ['viewer.main'] }. no-curly-component-invocation

However, Viewer.Main will not work, even if you update to as |Viewer|. The correct syntax is instead <viewer.main>.

Copy link
Member

rwjblue commented Mar 3, 2020

Ya, thanks for reporting! We should definitely fix the message to emit what will actually work.

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

No branches or pull requests

2 participants