Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 1.02 KB

no-empty-template-tag.md

File metadata and controls

30 lines (23 loc) · 1.02 KB
pageClass sidebarDepth title description
rule-details
0
lodash-template/no-empty-template-tag
disallow empty micro-template tag. (ex. 🆖 `<% %>`)

lodash-template/no-empty-template-tag

disallow empty micro-template tag. (ex. 🆖 <% %>)

  • ⚙️ 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".

Rule Details

This rule reports empty micro-template interpolate/evaluate.

<% /* eslint "lodash-template/no-empty-template-tag": "error" */ %>
<!-- ✓ GOOD -->
<div><%= text %></div>

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

Implementation