Skip to content
This repository was archived by the owner on Aug 24, 2022. It is now read-only.

Commit 1ee47f0

Browse files
authored
Merge pull request #269 from dwickern/handlebars-extension
lint `.handlebars` extension in addition to `.hbs`
2 parents 4174351 + a85c388 commit 1ee47f0

4 files changed

Lines changed: 20 additions & 1 deletion

File tree

broccoli-template-linter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function TemplateLinter(inputNode, _options) {
5050
TemplateLinter.prototype = Object.create(Filter.prototype);
5151
TemplateLinter.prototype.constructor = TemplateLinter;
5252

53-
TemplateLinter.prototype.extensions = ['hbs'];
53+
TemplateLinter.prototype.extensions = ['hbs', 'handlebars'];
5454
TemplateLinter.prototype.targetExtension = 'template.lint-test.js';
5555

5656
TemplateLinter.prototype.baseDir = function() {

node-tests/acceptance/broccoli-test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,4 +293,20 @@ describe('broccoli-template-linter', function() {
293293
expect(combinedLog)
294294
.to.not.contain('The `bare-strings` rule must be configured when using a localization framework');
295295
}));
296+
297+
it('generates tests for .handlebars files', co.wrap(function *() {
298+
input.copy(`${fixturePath}/handlebars-extension`);
299+
300+
subject = TemplateLinter.create(`${input.path()}/app`, {
301+
console: mockConsole,
302+
testGenerator: 'qunit'
303+
});
304+
305+
output = createBuilder(subject);
306+
yield output.build();
307+
308+
let result = output.read();
309+
expect(result).to.have.property('templates');
310+
expect(result.templates).to.have.property('application.template.lint-test.js');
311+
}));
296312
});
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: 'recommended'
3+
};

node-tests/fixtures/handlebars-extension/app/templates/application.handlebars

Whitespace-only changes.

0 commit comments

Comments
 (0)