Skip to content

Not sure how to handle/fix "no-this-in-template-only-components" #41

@boris-petrov

Description

@boris-petrov
test('it renders', async function (assert) {
  this.set('foo', 420);
  await render(hbs`{{some-component foo=this.foo}}`);
});

This leads to:

Usage of 'this' in path 'this.foo' is not allowed in a template-only component. Use '@foo' if it is a named argument or create a component.js for this component. (fixable)ember-template-lint(no-this-in-template-only-components)

This doesn't make sense in this case.

cc @rwjblue @dwickern

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions