no-nested-template-literals no need to report an error if there are no placeholders in the nested literal
WiseBird opened this issue · comments
I want to report a bug.
Reproducer
console.log(`Look at ${red(`can't`)} do this`); // gives an error
console.log(`I ${red("can't")} do this`); // doesn't
Expected behavior
Rule shouldn't report an error if there are no placeholders in the nested literal.
eslint-plugin-sonarjs version: 0.10.0
eslint version: 8.1.0
Node.js version: v16.5.0
Rule key: no-nested-template-literals
IMO even if there is no placeholders it's still relevant to refactor, especially as you can simply use quotes.
This issue has been migrated to Jira. ESLINTJS-16