Skip to content

lodash-template/prefer-escape-template-interpolations

prefer escape micro-template interpolations. (ex. 🆗 <%- ... %>, 🆖 <%= ... %>)

  • ⚙️ This rule is included in "plugin:lodash-template/all".

Rule Details

This rule reports no escape micro-template interpolates.

html
<% /* eslint "lodash-template/prefer-escape-template-interpolations": "error" */ %>
<!-- ✓ GOOD -->
<div><%- text %></div>
<div><% print(html) %></div>

<!-- ✗ BAD -->
<div>
<%= text %>
</div>

Implementation