- #559 Added video and audio with control attribute as interactive elements (@HenryVonfire)
- #607 Always ignore dist, tmp, node_modules by default. (@jasonmit)
- #600 Add {{welcome-page}} to default allowed list for no-implicit-this. (@rwjblue)
- #608 Improve clarity of descriptions and examples in rule docs. (@bmish)
- #606 Fix typo in 'no-unnecessary-concat' doc migration regexp. (@bmish)
- Bryan Mishkin (@bmish)
- Jason Mitchell (@jasonmit)
- Robert Jackson (@rwjblue)
- @HenryVonfire
- @iki6
- #598 Add lerna-changelog for changelog generation. (@rwjblue)
- #582 Ensure absolute paths are normalized when checking modules for "pending" status (@xcambar)
- #584 feat: add rule 'no-extra-mut-helper-argument'. (@bmish)
- #528 Add option to executable for specifying a custom config path (@krivaten)
- #535 Add no-action-modifiers rule (@bendemboski)
- #597 Fix config resolution with Yarn PnP. (@rwjblue)
- #592 fix: errors from 'simple-unless' rule with empty unless usage (@bmish)
- #591 feat: update 'style-concatenation' rule to catch an unsafe usage of the 'concat' helper. (@bmish)
- #580 Ensure failure when invalid config path is provided. (@xcambar)
- #568 Fix contextual component error message in attribute-indentation and block-indentation rules (@HodofHod)
- #590 docs: improve organization, formatting, and consistency for rule docs. (@bmish)
- #589 docs: reorganize, reformat, add links, and add examples to improve doc for 'style-concatenation' rule. (@bmish)
- #574 Fix typo in no-implicit-this documentation (@efx)
- #564 Removed ember-i18n recommendation in no-bare-string documentation (@Alonski)
- #563 Add an example of how to ignore files to the README (@h2blake)
- #547 Fix typo in table-groups rule documentation (@evoactivity)
- #544 Fix attribute-indentation rule documentation to comply with default config (@benmurden)
- #541 Fix attribute-indentation rule documentation to comply with default config (@benmurden)
- #540 Small tweaks to
no-shadowed-elementsdocs (@sduquej) - #515 Add documentation for no-shadowed-elements rule (@Willibaur)
- #538 Fix links and markdown styling (@scottwernervt)
- Alon Bukai (@Alonski)
- Ben Demboski (@bendemboski)
- Ben Murden (@benmurden)
- Bryan Mishkin (@bmish)
- Eli Flanagan (@efx)
- Heather Blake (@h2blake)
- Kris Van Houten (@krivaten)
- Liam Potter (@evoactivity)
- Robert Jackson (@rwjblue)
- Sander Steenhuis (@Redsandro)
- Scott Werner (@scottwernervt)
- Sebastián Duque (@sduquej)
- Tobias Bieniek (@Turbo87)
- William Bautista (@Willibaur)
- Xavier Cambar (@xcambar)
- @HodofHod
- Fix a number of issues with attribute-indentation:
- Ensure contextual component indentation / closing indentation is properly enforced.
- Ensure block opening indentation is properly detected when the block itself is indented.
- Ensure element modifiers are handled and do cause elements to fail attribute-indentation (note: this requires that all element modifiers are after all attributes).
- Refactor
linebreak-stylerule to add:systemsetting which enforces current system native line endingstruevalue now prevents mixing line endings (as opposed to enforcing a specific one)
- Fix a number of issues with
attribute-indentation:- Ensure that using a value-less attribute does not cause following attributes to be considered the wrong indentation
- Ensure that mustache invocation from within an ElementNode uses the correct indentation
- Add configuration to control where the
>//>or}}of the open element/mustache go- 'new-line' - requires the closing symbol on a new line (outdented)
- 'last-attribute' - requires the closing symbol to be directly after the last attribute
- Ensure invalid config errors are properly bubbled to the console
- Update
simple-unlessto allow eithermaxHelpersorwhitelistor both together
- Ensure the
no-implicit-thisrule allowshasBlock/has-blockwithout arguments. - Ensure
no-ambiguous-elementsrule does not mark angle bracket invocation of yielded block param paths as invalid.
- Fix issue causing
node_modulesto be scanned when runningember-template-lint ..
- Fix issue with
attribute-indentationrule parsing of element nodes. - Add
no-quoteless-attributesrule. See the rule documentation for details. - Add
no-quoteless-attributesto the defaultrecommendedconfiguration.
- Tweak bin script so that it automatically ignores any files ignored by
.gitignore. - Drop support for Node 4, 5, 7, and 9.
- Update
attribute-indentation's defaulttrueconfig to include processing of elements. - Make
0-8-recommendedconfiguration (to make upgrading a bit easier for folks. - Change "recommended" configuration
- To be added to the recommended config for 0.9.0:
no-inline-styleslinebreak-styleno-duplicate-attributestable-groupsattribute-indentationno-unnecessary-concatno-input-blockno-input-tagnameno-unboundno-outlet-outside-routesno-partialquotesno-attrs-in-componentsno-shadowed-elements
- To be removed from the recommended config for 0.9.0:
deprecated-inline-view-helper
- To be added to the recommended config for 0.9.0:
- Fix regression in
no-unused-block-paramsrule. - Add support for element validation to
attribute-indentationrule (enableable via theprocess-elementsconfiguration option).
- Add
link-href-attributesrule to forbidaelements without anhrefattribute.
- Add
--quietoption to command line interface. Similar to the same option ineslintthe--quietprevents warnings from being printed. - Fix issue with block param scope tracking (from
BlockStatements) included in prior versions.
- Fix issue with using literals in mustaches (e.g.
{{false}}).
- Update to latest
@glimmer/compiler(0.35.5). - Correct naming of
no-attrs-in-componentsrule (deprecatingno-attr-in-components). - Add line/column information to fatal / parsing errors.
- Deprecate
no-trailing-dot-in-path-expressionrule (it is now directly enforced by Glimmer itself). - Update
invocation-blacklistrule to accomodate angle bracket invocation. - Update
no-unused-block-paramrule to accomodate angle bracket invocation. - Add
Plugin.prototype.isLocalto test if a given node is derived from a block param. - Add ability to configure the indentation level for
attribute-indentationrule.
- Add
no-implicit-thisrule. See the documentation for more details. - Add
no-shadowed-elementsrule.
- Ensure
no-nested-interactiverule does not flag angle bracket invoked components.
- Fix issue with rule deprecation (introduced in 0.8.16). This was causing deprecated rules that were configured properly to "loose" their config.
- Ensure reported errors include line and column numbers.
- Add
invocable-blacklistrule allowing specific invokables to be disabled (e.g. you want to forbid astinky-garbagecomponent or helper from usage in your app). - Fix various ordering issues with
link-rel-noopenerrule (combinations ofnoreferrerandnoopenerwould incorrectly be marked as invalid). - Fix issues with templates with a string literal inside mustaches (e.g.
{{"foo"}}). - Remove
tabpanelfrom being considered an interactive element. - Add
aria-label,aria-placeholder,aria-roledescription,aria-valuetextto be considered as part of theno-bare-stringsrule. - Rename a number of rules for consistency. A deprecation message will be
emitted when the deprecated name is used in your applications configuration:
inline-styles->no-inline-stylesbare-strings->no-bare-stringshtml-comments->no-html-commentsinvalid-interactive->no-invalid-interactivenested-interactive->no-nested-interactivetriple-curlies->no-triple-curliesunused-block-params->no-unused-block-params
- add whitelist to simple-unless #356
- add no-partial rule #369
- unused-block-params: Disable rule when partial is used in scope #368
- Remove unused
lodashdependency #367 - add no-unnecessary-concat rule #365
- update @glimmer/compiler to version 0.32.3 #362
- Remove explicit
@glimmer/syntaxdependency #363 - add no-outlet-outside-routes rule #359
- add no-input-block and no-input-tagname rules #361
- add no-unbound rule #360
- fix attribute-indentation) #358
- fix eol-last #344
- fix attribute-indentation #334
- Allow form elements to have reset actions #355
- No trailing dot(s) in a path expression #342
- Allow sharing and extending configs #322
- table-groups improvements #335
- Ensure that the configuration objects are not mutated.
- Add new
quotesrule. Examples:
Enforce either:
or:
You can read more about the rule in the documentation.
- Ensure packages required by the executable script are dependencies. This fixes issues when using
ember-template-lintas a globally installed package.
- Fix issue with
attribute-indentationrule (reporting incorrect indentation for multiple valid invocations).
- Add new
no-trailing-spacesrule. Examples:
Bad:
Good:
You can read more about the rule in the documentation.
- Add new
eol-lastrule. Examples:
Enforce either:
or:
You can read more about the rule in the documentation.
- Add support for
colgroupandcaptiontotable-groupsrule. - Colorize the error severity in the console output.
- Add new
table-groupsrule. Examples:
The rule forbids the following:
Instead, you should write your table as:
You can read more about the rule in the documentation.
- Ensure that the contents of else blocks (a.k.a.
inverseblocks) are checked for indentation.
- Fix error in
simple-unlessrule when an{{ifor{{unlessblock was empty.
- Add new
template-lengthrule. When enabled, this rule restricts the total number of lines in a template file to the configured number. You can read more about the rule (and configuration) in the documentation.
- Add new
attribute-indentationrule. Examples:
You can read more about the rule (and configuration) in the documentation.
- Update @glimmer packages to 0.27.0.
- Update
block-indentationrule to allow{{#if foo}}stuff{{else}}stuff{{/if}}. - Fix error being thrown by
linebreak-stylerule when dynamic attributes were being used (e.g.<img alt="example" src={{some/thing here}}>).
- Add new rule
no-duplicate-attributesto prevent duplicating the same attributes in a single mustache/block/element. Read the documentation for more details. - Add new rule
linkbreak-styleto ensure all templates use the same style of linebreaks throughout the template. Read the documentation for more details.
- Fix issue with console output formatting to avoid noisy console output when no errors are present.
- Refactor the console output formatter to be a much closer match to ESLint output (changes the signature of
Linter.errorsToMessages).
- Cleanup dependencies (remove unused, update versions to latest, etc).
- Move rule documentation out of the
README.mdand intodocs/rules/<rule-name>.mdto make it simpler to reason about and link to documentation by rule. - Add
requireas an option toself-closing-void-elements. Use this value if you would like to require that all void elements are self closing (e.g. you require<img />).
- Move
strip-bomtodependencies(was mistakenly adevDependency).
- Prevent errors when using contextual components.
- Prevent errors within the
bare-stringsrule for<input placeholder="{{foo}}.">
-
Add support for user supplied rules and configuration. Please review the documentation for more details.
-
Add
ember-template-lintcommand line script. This enable much easier running of the linter from the command line, editor plugins, etc. Supports--jsonflag to enable easier consumption by tools. See documentation for more details. -
Allow
rel=noreferrerto satisfy thelink-rel-noopenerrule. -
Add
inline-stylesrule, which forbids using thestyleattribute in HTML elements. -
Drop support for Node < 4.
-
Fix a number of issues with
block-indentationrule when using "whitespace control" characters (e.g.{{~if foo~}}). -
Add support for globs in
.template-lintrc.js'signoreoption. -
Add
simple-unlessrule which forbids using{{unlesswith an inverse (or from an inverse), and with complex helper invocations as the predicate. -
Add
simple-unlessto the recommended configuration. -
Allow
<form onsubmit={{action 'foo'}}></form>from theinvalid-interactiverule. -
Remove
deprecated-each-syntaxfromrecommendedconfig. -
Add configurable option to
link-rel-noopenerto require bothnoopenerandnoreferrer. See the documentation for more details. -
Update to leverage ES2015 features that are supported in Node 4.
-
Added
no-logandno-debuggerrules. 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
Ruledefinition. A simpleclass extends Rule { }is all that is required.
-
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 rulesome-rule-namewith the default configuration (from.template-lintrc.js) ortrue(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 rulesome-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 rulesome-rule-namewith theJSON.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:
An in-element instruction will apply to only that element:
An in-element instruction with the -tree suffix will apply to that element and all its descendants:
-
Deprecate using HTML comments for enabling/disabling rules. Support for HTML comments will be removed in v0.7.0.
- Add
ignoreto allowed configuration values.ignoreis an array of moduleId's that are to be completely ignored. This is similar (but different) frompending. - Add
unused-block-paramsrule. The following example would fail this rule (since it has an unused block paramindex):
- Update
img-alt-attributesrule to allow<img alt>and<img alt="">. - Update
invalid-interactiverule to allow<form {{action 'foo' on="submit"}}>.
- Fix issue with new
deprecated-inline-view-helper(throwing error when parsing mustache statements).
- Add
invalid-interactiveto recommended rules. - Add
img-alt-attributesto recommended rules. - Add
style-concatenationto recommended rules. - Add
deprecated-inline-view-helperto recommended rules. - Add
link-rel-noopenerto recommended rules. - Remove support for Node 0.10.
- Add
deprecated-inline-view-helperrule. Usage of{{view/{{#viewhelper and{{view.path.here}}were deprecated in Ember 1.13, and subsequently removed in Ember 2.0. This rule flags these usages.
- Fix issue with the
invalid-interactiverule not honoring the documentedadditonalInteractiveTagsoption.
- Fix issue with
link-rel-noopenerrule when using properly with a listing (i.e.rel="noopener noreferrer"). - Add
inline-link-torule to prevent usage of inline{{link-to. - Add
style-concatenationrule. This prevents the usage of<div style="{{make-background url}}">(quoted value with any dynamic segments) but allows<div style={{make-background url}}>.
- Fix issue causing
<iframe>to be detected as{{#if. - Add
link-rel-noopenerrule. This rule requires that any<a target="_blank">have arel="noopener". This prevents the newly opened window from having access to the opener (and helps prevent a number of phishing attacks).
- Fix
invalid-indentationrule to allow scenarios where the opening and closing elements can have no space between. For example:
If the above </textarea> had been after a newline and indented properly, the default contents of the textarea would then include that whitespace. The rule now enforces
that there be no child elements within a given block.
- Remove a few ARIA roles that were incorrectly flagging things as interactive elements (i.e.
dialogandalertdialog).
- Fix bug with
invalid-interactiverule incorrectly flagging valid elements.
-
Change
nested-interactiverule to ignore elements usingtabindexwhen determining if a parent element is interactive.tabindexis still used for detecting all child elements once already inside of another interactive element. -
Fix various issues with
nested-interactiveand<label>.- Consider
<label>an interactive element. - Specifically handle the various edge cases of having
<label><input></label>. - Prevent multiple interactive elements inside of a
<label>.
- Consider
-
Fix bugs with the
invalid-indentationaround escaped mustaches and raw blocks. -
Add
invalid-interactiverule (full documentation). Adding interactivity to an element that is not naturally interactive content leads to a very poor experience for users of assistive technology (i.e. screen readers). In order to ensure that screen readers can provide useful information to their users, we should add an appropriateroleattribute when the underlying element would not have made that role obvious.This rule forbids the following:
Instead, you should add a role to the element in question so that the A/T is aware that it is interactive:
-
Add
img-alt-attributesrule (full documentation). An<img>without analtattribute is essentially invisible to assistive technology (i.e. screen readers). In order to ensure that screen readers can provide useful information, we need to ensure that all<img>elements have analtspecified. See WCAG Suggestion H37.The rule forbids the following:
Instead, you should write the template as:
- Add internal helper for determining if a given element is an interactive element.
- Update
nested-interactiverule to use the newisInteractiveElementhelper function. - Change
nested-interactiveconfiguration. Now uses an object (instead of an array). Example:
rules: {
'nested-interactive': {
ignoredTags: ['a', 'button'], // list of tag names to ignore
ignoreTabindex: true, // ignore the tabindex check
ignoreUsemapAttribute: ['img', 'object'], // ignore `usemap` check for specific tag names
additionalInteractiveTags: ['some-custom-tag'], // not sure this is needed, but it seams neat :P
}
}- Add ability to mark specific rules as pending for a module. Given the following
.template-lintrc.jsfile, thefoo/bar/bazmodule would have only its indentation related issues labeled as warnings:
module.exports = {
extends: 'recommended',
pending: [
{ moduleId: 'foo/bar/baz', only: ['block-indentation']}
]
}All other rules with errors in the foo/bar/baz template would still be reported as errors.
- Update internals to use better API for traversing nodes in template AST.
- Lock down parser version (should make package more stable as loose deps won't break consumers).
- Fix various issues with
block-indentationrule:- Ensure that usage of whitespace control in end block does not trigger an error. Before this:
{{#if foo}}{{~/if}}would error. - Validate indentation for block inverse (aka
{{else}}).
- Ensure that usage of whitespace control in end block does not trigger an error. Before this:
- Fix a bug with
block-indentationrule that would throw an error if a block contained a comment. - Fixed bugs upstream in HTMLBars that caused location information to be incorrect for attributes and comments.
- Remove
bare-stringsfromrecommendedconfiguration. See #27 for more details.
- Fix invalid rule name in
recommendedconfiguration. - Add ability to mark files as
pendingin the.template-lintrc.jsconfiguration file. When a module is listed in thependinglist, it will be checked but any errors detected will be marked as warnings (and will not trigger a failing test when using ember-cli-template-lint). If there are no errors detected when checking a pending file, a new error will be triggered. The goal of this process is to allow large existing projects begin utilizingember-template-lint/ember-cli-template-lintand slowly fix their template files to comply with the rules here. Feedback welcome on this idea/process...
-
Move rule configuration into
rulesproperty inside.tempalte-lintrc.js. Configuration in the root is still supported, but triggers a deprecation warning. Migration should be very straigtforward.Before:
// .template-lintrc.js module.exports = { 'bare-strings': true }
After:
// .template-lintrc.js module.exports = { rules: { 'bare-strings': true } }
- Add ability to extend from internally managed configurations.
- Add
recommendedconfiguration, which can be used via the following in your.template-lintrc.js:
module.exports = {
extends: 'recommended'
}- Add
fixinformation to the results object for:html-commentsself-closing-void-elementsdeprecated-each-syntax
- Add support for context shifting
{{#each(i.e.{{#each posts}}) to thedeprecated-each-syntax.
- Bring back rules lost during migration from ember-cli-template-lint (deprecated-each, self-closing-void-elements).
- Initial migration of plugins from ember-cli-template-lint.
- Implement new node API for the Linter.
- Implement new result objects.