Skip to content

Commit

Permalink
Skip embedded templates handling in eol-last rule
Browse files Browse the repository at this point in the history
  • Loading branch information
robinborst95 committed Mar 15, 2023
1 parent cdf677a commit a7d1f77
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/rules/eol-last.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import Rule from './_base.js';

export default class EolLast extends Rule {
parseConfig(config) {
if (!this.isStrictMode) {
return false;
}

let configType = typeof config;

switch (configType) {
Expand Down
13 changes: 13 additions & 0 deletions test/unit/rules/eol-last-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@ generateRuleTests({
config: 'always',
template: '{{#my-component}}{{/my-component}}\n',
},
{
config: 'always',
template: [
"import { hbs } from 'ember-cli-htmlbars';",
'',
"test('it renders', async (assert) => {",
' await render(hbs`<img>`);',
');',
].join('\n'),
meta: {
filePath: 'layout.js',
},
},
],

bad: [
Expand Down

0 comments on commit a7d1f77

Please sign in to comment.