eslint-plugin-misc

ESLint plugin

This project is maintained by iliubinskii

no-unnecessary-template-literal

ESLint plugin / no-unnecessary-template-literal

Disallows unnecessary template literals.

module.exports = {
  plugins: ["misc"],
  rules: {
    "misc/no-unnecessary-template-literal": "error"
  }
};

Examples of incorrect code

const x = `
  text
`;

Examples of correct code

const x = "text";

const y = `
  text
  text
`;

const z = `
  text ${x} text
`;