Hi there! π First of all, thanks again for this plugin, super helpful, the things available in this plugin.
I wanted to propose a new rule to address a pattern that I have seen from a lot of our students at @upleveled - writing overly complex patterns with unnecessary interpolations in template strings (eg. a single string variable, or a string literal, or multiple string literals).
const withString = `${str}`;
const withStringLiteral = `${'abc'}`;
const withMultipleStringLiterals = `${'abc'}${'def'}`;
const withString = str;
const withStringLiteral = 'abc';
const withMultipleStringLiterals = 'abcdef';
Looking into the ASTExplorer, I guess the simple version of the first failure case below would be:
TemplateLiteral.expressions
(an Identifier
)TemplateLiteral.quasis
, all empty stringsFor the literals, I guess no limit to the quasis
, but every element in expressions
should be a Literal
.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too