@putout/plugin-remove-useless-template-expressions
v2.0.0
Published
šPutout plugin adds ability to remove useless template expressions
Downloads
57,643
Maintainers
Readme
@putout/plugin-remove-useless-template-expressions
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