ember-template-lint icon indicating copy to clipboard operation
ember-template-lint copied to clipboard

more options to quotes rule

Open kellyselden opened this issue 7 years ago • 1 comments

I implemented the quotes rule the quickest and to satisfy the style I was using. It is now clear that there should be at least one more option for when you enter hbs syntax.

Some people prefer

<foo bar="asdf" baz={{concat 'asdf' 'asdf'}} />

This is not possible with the current rule, where it is all or nothing double qoutes.

I'm not sure the api, but maybe something like

'quotes': {
  outsideCurlies: 'double',
  insideCurlies: 'single'
}

kellyselden avatar Jan 19 '19 09:01 kellyselden

This becomes more important, since prettier formats templates this way.

pieter-v avatar Mar 17 '22 07:03 pieter-v

Been open since 2019... how do we do this? When I enabled this rule I kinda expected it to just ignore the HTML quotes.

Also could the options be "htmlQuotes" and "hdsQuotes" (or just hbs and html)?

robclancy avatar Dec 22 '22 09:12 robclancy

I think it's done https://github.com/ember-template-lint/ember-template-lint/pull/2754

robclancy avatar Dec 22 '22 13:12 robclancy

Try it out in: https://github.com/ember-template-lint/ember-template-lint/releases/tag/v5.9.0

bmish avatar May 24 '23 23:05 bmish