@putout/plugin-remove-useless-template-expressions

2.0.0 • Public • Published

@putout/plugin-remove-useless-template-expressions NPM version

Template literals are literals delimited with backtick (`) characters, allowing for multi-line strings, string interpolation with embedded expressions, and special constructs called tagged templates.

(c) MDN

🐊Putout plugin adds ability to remove useless template expressions.

Install

npm i @putout/plugin-remove-useless-template-expressions -D

Rule

{
    "rules": {
        "remove-useless-template-expressions": "on"
    }
}

Example of incorrect code

const y = `${'hello'} + ${'world'}`;

Example of correct code

const y = `hello + world`;

License

MIT

Package Sidebar

Install

npm i @putout/plugin-remove-useless-template-expressions

Weekly Downloads

13,900

Version

2.0.0

License

MIT

Unpacked Size

4.79 kB

Total Files

4

Last publish

Collaborators

  • coderaiser