# lodash-template/scriptlet-indent

enforce consistent indentation to scriptlet in micro-template tag.

  • ⚙️ This rule is included in all of "plugin:lodash-template/recommended", "plugin:lodash-template/recommended-with-html", "plugin:lodash-template/recommended-with-script" and "plugin:lodash-template/all".
  • 🔧 The --fix option on the command line (opens new window) can automatically fix some of the problems reported by this rule.

# Rule Details

This rule enforces a consistent indentation style to script in micro-template tag. The default style is 2 spaces.

Now loading...

# Options

  "lodash-template/script-indent": ["error", type, {
    "startIndent": 1,
    "switchCase": 0
  • type (number | "tab") ... The type of indentation. Default is 2. If this is a number, it's the number of spaces for one indent. If this is "tab", it uses one tab for one indent.
  • startIndent (integer) ... The multiplier of indentation for top-level statements in micro-template tag. Default is 1.
  • switchCase (integer) ... The multiplier of indentation for case/default clauses. Default is 0.

# Examples for this rule with {startIndent: 0}:

Now loading...

# Examples for this rule with {startIndent: 2}:

Now loading...

# Implementation