node_modules/eslint/lib/rules/prefer-template.js in immosquare-cleaner-0.1.32 vs node_modules/eslint/lib/rules/prefer-template.js in immosquare-cleaner-0.1.38
- old
+ new
@@ -111,10 +111,10 @@
function endsWithTemplateCurly(node) {
if (node.type === "BinaryExpression") {
return startsWithTemplateCurly(node.right);
}
if (node.type === "TemplateLiteral") {
- return node.expressions.length && node.quasis.length && node.quasis[node.quasis.length - 1].range[0] === node.quasis[node.quasis.length - 1].range[1];
+ return node.expressions.length && node.quasis.length && node.quasis.at(-1).range[0] === node.quasis.at(-1).range[1];
}
return node.type !== "Literal" || typeof node.value !== "string";
}
//------------------------------------------------------------------------------