Skip to content

0.13.x to 0.14.x

Breaking Changes

  • Moved some rule categories.
  • Rename some rules.
  • The configuration method for customizing the target extension has changed.
  • The configuration method for suppressing the reporting of specific rules in the template file has changed.
  • Drop supports for ESLint@5

Moved some rule categories.

In 0.13.x

  • Rule lodash-template/no-warning-html-comments was category best-practices.
  • Rule lodash-template/no-html-comments was category best-practices.

For 0.14.x

  • Rule lodash-template/no-warning-html-comments has moved to category recommended-with-html.
  • Rule lodash-template/no-html-comments has moved to category recommended-with-html.

Rename some rules.

  • lodash-template/no-multi-spaces-in-script to lodash-template/no-multi-spaces-in-scriptlet
  • lodash-template/script-indent to lodash-template/scriptlet-indent

Customize target extentions

In 0.13.x

In 0.13.x, it was set in .eslintrc.js as follows:

(For example, for EJS.)

diff
  "use strict"

+ const pluginLodashTemplate = require("eslint-plugin-lodash-template")
+ pluginLodashTemplate.addTargetExtensions(".ejs")

  module.exports = {

For 0.14.x

For 0.14.x, please set .eslintrc.* as follows:

(For example, for EJS.)

diff
+    "overrides": [
+        {
+            "files": ["*.ejs"],
+            "processor": "lodash-template/html"
+        }
+    ]

Suppress no-undef warnings in the template tag

In 0.13.x

In 0.13.x, it was set the global variable used in all templates as follows.

.eslintrc.json:

diff
  {
      "rules": {
+         "lodash-template/plugin-option": [2, {
+             "globals": ["variableName"],
+         }]
      }
  }

For 0.14.x

For 0.14.x, please set the global variable used in all templates as follows.

.eslintrc.json:

diff
  {
      "settings": {
+         "lodash-template/globals": ["variableName"]
      }
  }

Suppress reports for specific rules in template files

In 0.13.x

In 0.13.x, it was set as follows.

.eslintrc.json:

diff
  {
      "rules": {
+         "lodash-template/plugin-option": [2, {
+             "ignoreRules": ["no-undef", "no-tabs"],
+         }]
      }
  }

For 0.14.x

For 0.14.x, please set as follows.

.eslintrc.json:

diff
  {
      "settings": {
+         "lodash-template/ignoreRules": ["no-undef", "no-tabs"]
      }
  }