Skip to content

Conversation

jelhan
Copy link
Contributor

@jelhan jelhan commented May 31, 2020

This adds a failing test that indentation is invalid (accordingly to default template linting) if <Form::Element> uses multiple lines for it's arguments and attributes on input:

Taking this input:

<form.element
  @property="foo">
  @placeholder="foo">
/>

I would expect an output, which passes template linting. An example would be:

<form.element
  @property="foo"
  as |el|
>
  <el.control placeholder="foo" />
</form.element>

But I see this one as demonstrated by failing test:

<form.element
  @property="foo"
as |el|><el.control placeholder="foo" /></form.element>

Template linter throws errors due to indentation of </form.element> and <el.control />.

This adds a failing test that indentation is invalid (accordingly to
default template linting) if `<Form::Element>` uses multiple lines for
it's arguments and attributes on input:

Taking this input:

```hbs
<form.element
  @Property="foo">
  @Placeholder="foo">
/>
```

I would expect an output, which passes template linting. An example
would be:

```hbs
<form.element
  @Property="foo"
  as |el|
>
  <el.control placeholder="foo" />
</form.element>
```

But I see this one as demonstrated by failing test:

```hbs
<form.element
  @Property="foo"
as |el|><el.control placeholder="foo" /></form.element>
```

Template linter throws errors due to indentation of `</form.element>`
and `<el.control />`.
@simonihmig
Copy link
Contributor

Confirmed. But I believe there is not much we can do about it. Related: ember-template-lint/ember-template-recast#82

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

Successfully merging this pull request may close these issues.

2 participants