exclude tagged template literals from js/superfluous-trailing-arguments

This commit is contained in:
erik-krogh
2024-02-06 09:36:30 +01:00
parent 525f27173d
commit 94b7bda3dc
2 changed files with 12 additions and 2 deletions

View File

@@ -46,7 +46,8 @@ class SpuriousArguments extends Expr {
SpuriousArguments() { SpuriousArguments() {
this = invk.getArgument(maxArity(invk)).asExpr() and this = invk.getArgument(maxArity(invk)).asExpr() and
not invk.isIncomplete() not invk.isIncomplete() and
not invk.getAstNode() instanceof TaggedTemplateExpr
} }
/** /**

View File

@@ -129,4 +129,13 @@ function sum2() {
} }
// OK // OK
sum2(1, 2, 3); sum2(1, 2, 3);
const $ = function (x, arr) {
console.log(x, arr);
};
// OK
async function tagThing(repoUrl, directory) {
await $`git clone ${repoUrl} ${directory}`;
}