ember-template-lint / eslint-plugin-hbs

Plugin for eslint which checks inline hbs templates
ISC License
18 stars 8 forks source link

difficulties with no-trailing-spaces rule #9

Closed kellyselden closed 6 years ago

kellyselden commented 6 years ago

There was a new rule added, no-trailing-spaces, that doesn't play well with indented templates:

test('it renders', function(assert) {
  this.render(hbs`
    {{member-component
      template block text
    }}
  `); // <-- "trailing spaces"
});

To be compatible with the rule, all templates would have to have ugly indentation:

test('it renders', function(assert) {
  this.render(hbs`
    {{member-component
      template block text
    }}
`);
});

Instead of altering all the tests, would you be open to trimming or un-indenting the template before you send it to the linter?

cc @rwjblue