duggiefresh / ember-cli-template-lint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ember-cli-template-lint

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 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 test-node
  • ember test
  • ember test --server

Building

  • ember build

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

About

License:MIT License


Languages

Language:JavaScript 93.2%Language:HTML 6.8%