pageClass | sidebarDepth | title | description |
---|---|---|---|
rule-details |
0 |
lodash-template/no-invalid-template-interpolation |
disallow other than expression in micro-template interpolation. (ex. 🆖 `<%= if (test) { %>`) |
disallow other than expression in micro-template interpolation. (ex. 🆖
<%= if (test) { %>
)
- ⚙️ This rule is included in all of
"plugin:lodash-template/best-practices"
,"plugin:lodash-template/recommended"
,"plugin:lodash-template/recommended-with-html"
,"plugin:lodash-template/recommended-with-script"
and"plugin:lodash-template/all"
.
This rule disallow other than expression in micro-template interpolation.
<% /* eslint "lodash-template/no-invalid-template-interpolation": "error" */ %>
<!-- ✓ GOOD -->
<% if (a) { %>
<div></div>
<% } %>
<div><%= text %></div>
<!-- ✗ BAD -->
<%= if (a) { %>
<div></div>
<% } %>
<div><%= /**/ %></div>