ember-template-lint
Advanced tools
Comparing version 0.5.16 to 0.5.17
Changelog | ||
========= | ||
## v0.5.17 | ||
- Fix issue with the `invalid-interactive` rule not honoring the documented `additonalInteractiveTags` option. | ||
## v0.5.16 | ||
- Fix issue with `link-rel-noopener` rule when using properly with a listing (i.e. `rel="noopener noreferrer"`). | ||
- Add `inline-link-to` rule to prevent usage of inline `{{link-to`. | ||
- Add `style-concatenation` rule. This prevents the usage of `<div style="{{make-background url}}">` (quoted value with any dynamic segments) but allows | ||
`<div style={{make-background url}}>`. | ||
## v0.5.15 | ||
- Fix issue causing `<iframe>` to be detected as `{{#if`. | ||
- Add `link-rel-noopener` rule. This rule requires that any `<a target="_blank">` have a `rel="noopener"`. This prevents the newly opened window from having access | ||
to the opener (and helps prevent a number of phishing attacks). | ||
## v0.5.14 | ||
@@ -5,0 +22,0 @@ |
@@ -14,2 +14,12 @@ 'use strict'; | ||
InvalidInteractive.prototype.isCustomInteractiveElement = function(node) { | ||
var additionalInteractiveTags = this.config.additionalInteractiveTags || []; | ||
if (additionalInteractiveTags.indexOf(node.tag) > -1) { | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
}; | ||
InvalidInteractive.prototype.visitors = function() { | ||
@@ -20,3 +30,4 @@ this._element = null; | ||
enter: function(node) { | ||
this._element = !isInteractiveElement(node) ? node : null; | ||
var isInteractive = isInteractiveElement(node) || this.isCustomInteractiveElement(node); | ||
this._element = !isInteractive ? node : null; | ||
}, | ||
@@ -23,0 +34,0 @@ |
{ | ||
"name": "ember-template-lint", | ||
"version": "0.5.16", | ||
"version": "0.5.17", | ||
"description": "Lint your templates.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -13,3 +13,11 @@ 'use strict'; | ||
'<div role="button" {{action "foo"}}></div>', | ||
'<li><button {{action "foo"}}></button></li>' | ||
'<li><button {{action "foo"}}></button></li>', | ||
{ | ||
config: { additionalInteractiveTags: ['div'] }, | ||
template: '<div {{action "foo"}}></div>' | ||
}, | ||
{ | ||
config: { additionalInteractiveTags: ['div'] }, | ||
template: '<div onclick={{action "foo"}}></div>' | ||
} | ||
], | ||
@@ -16,0 +24,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
135244
3687