Ember CLI integration for ember-template-lint
JavaScript HTML
Permalink
Failed to load latest commit information.
blueprints/ember-cli-template-lint Cleanup issues with rule deprecations. May 29, 2018
config Update to ember-cli@3.3.0 blueprint. Jul 24, 2018
lib Update to ember-cli@3.3.0 blueprint. Jul 24, 2018
node-tests Fix test fixtures. Jul 24, 2018
tests Update to ember-cli@3.3.0 blueprint. Jul 24, 2018
.editorconfig rm redundant rules. Oct 18, 2016
.ember-cli Initial Commit from Ember CLI v1.13.1 Jul 27, 2015
.eslintignore Update to ember-cli@3.3.0 blueprint. Jul 24, 2018
.eslintrc.js Update to ember-cli@3.3.0 blueprint. Jul 24, 2018
.gitignore Update to ember-cli@3.3.0 blueprint. Jul 24, 2018
.jshintrc Initial Commit from Ember CLI v1.13.1 Jul 27, 2015
.npmignore Update to ember-cli@3.3.0 blueprint. Jul 24, 2018
.template-lintrc.js Remove/Replace remaining JSHint directives May 5, 2017
.travis.yml Migrate to staged CI runs. Jul 24, 2018
.watchmanconfig Upgrade to Ember-CLI 2.3.0 Feb 17, 2016
CHANGELOG.md Add v1.0.0-beta.1 to CHANGELOG.md. Jul 26, 2018
LICENSE.md Update to ember-cli@3.3.0 blueprint. Jul 24, 2018
README.md reflect change in rule name from bare-strings to no-bare-strings May 29, 2018
broccoli-template-linter.js reflect change in rule name from bare-strings to no-bare-strings May 29, 2018
ember-cli-build.js Replace "var" with "let/const" May 5, 2017
index.js Allow ember-qunit and ember-mocha directly. Jun 21, 2018
package.json 1.0.0-beta.1 Jul 26, 2018
testem.js Update to ember-cli@3.3.0 blueprint. Jul 24, 2018
yarn.lock Bump broccoli-concat from 3.4.0 to 3.6.0 Aug 15, 2018

README.md

ember-cli-template-lint

npm version Build Status

ember-cli-template-lint will lint your templates and add a test for each asserting that all style rules have been satisfied.

For example, given the rule no-bare-strings is enabled, this template would be in violation:

{{! app/components/my-thing/template.hbs }}
<div>A bare string</div>

Thus a the test TemplateLint: app/components/my-thing/template.hbs would fail with the assertion "A bare string was found (0:5)".

Install

To install ember-cli-template-lint

ember install ember-cli-template-lint

Ember CLI >= 2.4.2 is required for linting templates

Configuration

ember-cli-template-lint is powered by ember-template-lint which allows configuration by using a .template-lintrc.js file in the root of your project.

See here details on configuration and rules that are available.

Contributing

A few ideas for where to take this in the future:

  • The list of rules should be configurable
  • This addon should use a test printer shared with jshint, eslint and jscs addons
  • A command-line version of the linter should be provided so IDEs and editors can provide feedback to devs during development

Installation

  • git clone this repository
  • npm install
  • bower install

Running

Running Tests

  • npm run nodetest
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

Troubleshooting

If your files aren't linted make sure that you don't have the following option set in your ember-cli-build.js:

var app = new EmberApp(defaults, {
  hinting: false
});