You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This behavior seemed to start in ember-template-lint v5 because .js files were included by default. But you can reproduce it on ember-template-lint v4 by running directly against a js file, e.g. ember-template-lint ./tests/integration/components/duration-picker-test.js.
It seems like the intention in #2 was for ember-template-lint-plugin-prettier not to run against embedded blocks:
This code fails the ember-template-lint
prettier
rule:After running
ember-template-lint --fix
, this is the result:Not good.
This behavior seemed to start in ember-template-lint v5 because
.js
files were included by default. But you can reproduce it on ember-template-lint v4 by running directly against a js file, e.g.ember-template-lint ./tests/integration/components/duration-picker-test.js
.It seems like the intention in #2 was for ember-template-lint-plugin-prettier not to run against embedded blocks:
ember-template-lint-plugin-prettier/lib/rules/prettier.js
Lines 45 to 49 in 43d7270
But the contents of the
hbs`...`
block is getting passed into this plugin without any surrounding context and with{ line: 1, column: 0 }
.Solutions
For now the best solution IMO is to disable this plugin for js files:
Inline hbs support in prettier prettier/prettier#8647 is currently blocked by prettier/prettier#5588 and not getting much traction.
The text was updated successfully, but these errors were encountered: