# All Rules

# Base Rules (Enabling Correct ESLint Parsing)

Enable this plugin using with:

  "extends": "plugin:lodash-template/base"
Rule ID Description
lodash-template/no-script-parsing-error disallow parsing errors in template

# Best Practices (Improve Development Experience)

Enforce all the rules in this category with:

  "extends": "plugin:lodash-template/best-practices"
Rule ID Description
lodash-template/no-empty-template-tag disallow empty micro-template tag. (ex. 馃問 <% %>)
lodash-template/no-invalid-template-interpolation disallow other than expression in micro-template interpolation. (ex. 馃問 <%= if (test) { %>)
lodash-template/no-semi-in-template-interpolation disallow the semicolon at the end of expression in micro template interpolation.(ex. 馃啑 <%= text %> 馃問 <%= text; %>) 馃敡

Enforce all the rules in this category and all the rules in Best Practices categories with:

  "extends": "plugin:lodash-template/recommended"
Rule ID Description
lodash-template/no-irregular-whitespace disallow irregular whitespace outside the template tags. 馃敡
lodash-template/no-multi-spaces-in-scriptlet disallow multiple spaces in scriptlet. (ex. 馃問 <% if路路路(test)路路路{ %>) 馃敡
lodash-template/scriptlet-indent enforce consistent indentation to scriptlet in micro-template tag. 馃敡
lodash-template/template-tag-spacing enforce unified spacing in micro-template tag. (ex. 馃啑 <%= prop %>, 馃問 <%=prop%>) 馃敡

Enforce all the rules in this category and all the rules in Best Practices/Recommended categories with:

  "extends": "plugin:lodash-template/recommended-with-html"
Rule ID Description
lodash-template/attribute-name-casing enforce HTML attribute name casing. (ex. 馃啑 <div foo-bar> 馃問 <div fooBar> <div FOO-BAR>) 馃敡
lodash-template/attribute-value-quote enforce quotes style of HTML attributes. (ex. 馃啑 <div class="abc"> 馃問 <div class='abc'> <div class=abc>) 馃敡
lodash-template/element-name-casing enforce HTML element name casing. (ex. 馃啑 <xxx-element> 馃問 <xxxElement> <DIV>) 馃敡
lodash-template/html-closing-bracket-newline require or disallow a line break before tag's closing brackets 馃敡
lodash-template/html-closing-bracket-spacing require or disallow a space before tag's closing brackets. (ex. 馃啑 <input> <input路/> 馃問 <input路> <input/>) 馃敡
lodash-template/html-comment-content-newline require or disallow a line break before and after HTML comment contents 馃敡
lodash-template/html-comment-spacing enforce unified spacing in HTML comment. (ex. 馃啑 <!-- comment -->, 馃問 <!--comment-->) 馃敡
lodash-template/html-content-newline require or disallow a line break before and after HTML contents 馃敡
lodash-template/html-indent enforce consistent HTML indentation. 馃敡
lodash-template/max-attributes-per-line enforce the maximum number of HTML attributes per line 馃敡
lodash-template/no-duplicate-attributes disallow duplication of HTML attributes. (ex. 馃問 <div foo foo>)
lodash-template/no-html-comments disallow HTML comments. (ex. 馃問 <!-- comment -->)
lodash-template/no-multi-spaces-in-html-tag disallow multiple spaces in HTML tags. (ex. 馃問 <input路路路type="text">) 馃敡
lodash-template/no-space-attribute-equal-sign disallow spacing around equal signs in attribute. (ex. 馃啑 <div class="item"> 馃問 <div class = "item">) 馃敡
lodash-template/no-warning-html-comments disallow specified warning terms in HTML comments. (ex. 馃問 <!-- TODO:task -->)

# Uncategorized

No preset enables the rules in this category. Please enable each rule if you want.

For example:

  "rules": {
    "lodash-template/no-template-tag-in-start-tag": "error"
Rule ID Description
lodash-template/no-template-tag-in-start-tag disallow template tag in start tag outside attribute values. (ex. 馃問 <input <%= 'disabled' %> >)
lodash-template/prefer-escape-template-interpolations prefer escape micro-template interpolations. (ex. 馃啑 <%- ... %>, 馃問 <%= ... %>)

# Deprecated

  • 鈿狅笍 We're going to remove deprecated rules in the next major release. Please migrate to successor/new rules.
  • 馃槆 We don't fix bugs which are in deprecated rules since we don't have enough resources.
Rule ID Replaced by
lodash-template/no-multi-spaces-in-script lodash-template/no-multi-spaces-in-scriptlet
lodash-template/plugin-option (no replacement)
lodash-template/script-indent lodash-template/scriptlet-indent