Skip to content

Releases: ember-template-lint/ember-template-lint

v0.7.2

07 Jul 18:00
Compare
Choose a tag to compare

CHANGELOG

  • Prevent errors when using contextual components.

v0.7.0

22 Jun 22:22
Compare
Choose a tag to compare

CHANGELOG

  • Add support for user supplied rules and configuration. Please review the documentation for more details.

  • Add ember-template-lint command line script. This enable much easier running of the linter from the command line, editor plugins, etc. Supports --json flag to enable easier consumption by tools. See documentation for more details.

  • Allow rel=noreferrer to satisfy the link-rel-noopener rule.

  • Add inline-styles rule, which forbids using the style attribute in HTML elements.

  • Drop support for Node < 4.

  • Fix a number of issues with block-indentation rule when using "whitespace control" characters (e.g. {{~if foo~}}).

  • Add support for globs in .template-lintrc.js's ignore option.

  • Add unless-helper rule which forbids using {{unless with an inverse (or from an inverse), and with complex helper invocations as the predicate.

    {{! good }}
    
    <div class="{{unless foo "bar"}}"></div>
    {{#unless something}}
    {{/unless}}
    
    {{! bad }}
    
    {{#unless something}}
    {{else}}
    {{/unless}}
    
    
    {{#unless (complex (helper (invocation)))}}
    {{/unless}}
  • Add unless-helper to the recommended configuration.

  • Allow <form onsubmit={{action 'foo'}}></form> from the invalid-interactive rule.

  • Remove deprecated-each-syntax from recommended config.

  • Add configurable option to link-rel-noopener to require both noopener and noreferrer. See the documentation for more details.

  • Update to leverage ES2015 features that are supported in Node 4.

  • Added no-log and no-debugger rules. These rules forbid usage of {{log}} and {{debugger} helpers, which should be used only for local debugging and never checked in.

  • Fix issues around templates including a Byte Order Mark.

  • Upgrade underlying engine to leverage @glimmer/compiler@0.25.1. Includes much smaller footprint, better location support, easier to use plugin API.

  • Change API around Rule definition. A simple class extends Rule { } is all that is required.

v0.7.0-beta.3

22 Jun 17:18
Compare
Choose a tag to compare
v0.7.0-beta.3 Pre-release
Pre-release

CHANGELOG

  • Add support for user supplied rules and configuration. Please review the documentation for more details.

  • Add ember-template-lint command line script. This enable much easier running of the linter from the command line, editor plugins, etc. Supports --json flag to enable easier consumption by tools. See documentation for more details.

  • Allow rel=noreferrer to satisfy the link-rel-noopener rule.

  • Add inline-styles rule, which forbids using the style attribute in HTML elements.

  • Drop support for Node < 4.

  • Fix a number of issues with block-indentation rule when using "whitespace control" characters (e.g. {{~if foo~}}).

  • Add support for globs in .template-lintrc.js's ignore option.

  • Add unless-helper rule which forbids using {{unless with an inverse (or from an inverse), and with complex helper invocations as the predicate.

    {{! good }}
    
    <div class="{{unless foo "bar"}}"></div>
    {{#unless something}}
    {{/unless}}
    
    {{! bad }}
    
    {{#unless something}}
    {{else}}
    {{/unless}}
    
    
    {{#unless (complex (helper (invocation)))}}
    {{/unless}}
  • Add unless-helper to the recommended configuration.

  • Allow <form onsubmit={{action 'foo'}}></form> from the invalid-interactive rule.

  • Remove deprecated-each-syntax from recommended config.

  • Add configurable option to link-rel-noopener to require both noopener and noreferrer. See the documentation for more details.

  • Update to leverage ES2015 features that are supported in Node 4.

  • Added no-log and no-debugger rules. These rules forbid usage of {{log}} and {{debugger} helpers, which should be used only for local debugging and never checked in.

  • Fix issues around templates including a Byte Order Mark.

  • Upgrade underlying engine to leverage @glimmer/compiler@0.25.1. Includes much smaller footprint, better location support, easier to use plugin API.

  • Change API around Rule definition. A simple class extends Rule { } is all that is required.

v0.6.4

15 Feb 21:03
Compare
Choose a tag to compare

CHANGELOG

  • Fix many issues with whitespace control (things like {{~#if foo ~}}).
  • Fix bug in block-indentation rule that caused errors when using handlebars style comments.

v0.6.3

17 Nov 20:08
Compare
Choose a tag to compare

CHANGELOG

  • Add support for Handlebars comments.

    A few new types of control statements are now available:

    • {{! template-lint-enable some-rule-name }} - This will enable the rule some-rule-name with the default configuration (from .template-lintrc.js) or true (if not present in the config file). This can be ran for multiple rules at once (i.e. {{! template-lint-enable bare-strings some-other-thing }}).
    • {{! template-lint-disable some-rule-name }} - This will disable the rule some-rule-name. Multiple rules can be provided at once (i.e. {{! template-lint-disable bare-strings some-other-thing }}).
    • {{! template-lint-configure some-rule-name { "whitelist": ["some", "valid", "json"] } }} - This configures the rule some-rule-name with the JSON.parse()'ed result of the second argument. The configure instruction only applies toa single rule at a time.

    These configuration instructions do not modify the rule for the rest of the template, but instead only modify it within whatever DOM scope the comment instruction appears.

    An instruction will apply to all later siblings and their descendants:

    {{! disable for <p> and <span> and their contents, but not for <div> or <hr> }}
    <div>
      <hr>
      {{! template-lint-disable }}
      <p>
        <span>Hello!</span>
      </p>
    </div>

    An in-element instruction will apply to only that element:

    {{! enable for <p>, but not for <div>, <hr> or <span> }}
    <div>
      <hr>
      <p {{! template-lint-enable }}>
        <span>Hello!</span>
      </p>
    </div>

    An in-element instruction with the -tree suffix will apply to that element and all its descendants:

    {{! configure for <p>, <span> and their contents, but not for <div> or <hr> }}
    <div>
      <hr>
      <p {{! template-lint-configure-tree block-indentation "tab" }}>
        <span>Hello!</span>
      </p>
    </div>
  • Deprecate using HTML comments for enabling/disabling rules. Support for HTML comments will be removed in v0.7.0.

v0.6.2

17 Nov 16:56
Compare
Choose a tag to compare

CHANGELOG

  • Add ignore to allowed configuration values. ignore is an array of moduleId's that are to be completely ignored. This is similar (but different) from pending.
  • Add unused-block-params rule. The following example would fail this rule (since it has an unused block param index):
{{#each foo as |bar index|}}
  {{bar}}
{{/each}}
  • Update img-alt-attributes rule to allow <img alt> and <img alt="">.
  • Update invalid-interactive rule to allow <form {{action 'foo' on="submit"}}>.

v0.6.1

07 Nov 22:07
Compare
Choose a tag to compare

CHANGELOG

  • Fix issue with new deprecated-inline-view-helper (throwing error when parsing mustache statements).

v0.6.0

05 Nov 15:45
Compare
Choose a tag to compare

CHANGELOG

  • Add invalid-interactive to recommended rules.
  • Add img-alt-attributes to recommended rules.
  • Add style-concatenation to recommended rules.
  • Add deprecated-inline-view-helper to recommended rules.
  • Add link-rel-noopener to recommended rules.
  • Remove support for Node 0.10.

v0.5.18

05 Nov 15:44
Compare
Choose a tag to compare

CHANGELOG

  • Add deprecated-inline-view-helper rule. Usage of {{view / {{#view helper and {{view.path.here}} were deprecated in Ember 1.13, and subsequently removed in Ember 2.0.
    This rule flags these usages.

v0.5.17

29 Sep 12:43
Compare
Choose a tag to compare

CHANGELOG

  • Fix issue with the invalid-interactive rule not honoring the documented additonalInteractiveTags option.