lodash-template/no-script-parsing-error
disallow parsing errors in template
- ⚙️ This rule is included in all of
"plugin:lodash-template/base"
,"plugin:lodash-template/all"
,"plugin:lodash-template/best-practices"
,"plugin:lodash-template/recommended"
,"plugin:lodash-template/recommended-with-html"
and"plugin:lodash-template/recommended-with-script"
.
Rule Details
This rule reports syntax errors in JavaScript template.
This rule works when verification of "JavaScript Templates" is enabled.
js
/* eslint "lodash-template/no-script-parsing-error": "error" */
/* ✓ GOOD */
<% if (a) { %>
const a = 'ABC'
<% } else { %>
const a = 'DEF'
<% } %>
js
/* eslint "lodash-template/no-script-parsing-error": "error" */
/* ✗ BAD */
<% if (a) { %>
const a = 'ABC'
<% } %>
const a = 'DEF'