diff --git a/lib/rules/no-ref-as-operand.js b/lib/rules/no-ref-as-operand.js index db92f19e4..b1a9e12a8 100644 --- a/lib/rules/no-ref-as-operand.js +++ b/lib/rules/no-ref-as-operand.js @@ -233,7 +233,7 @@ module.exports = { }, // `${refValue}` /** @param {Identifier} node */ - 'TemplateLiteral>Identifier'(node) { + ':not(TaggedTemplateExpression)>TemplateLiteral>Identifier'(node) { reportIfRefWrapped(node) }, // refValue.x diff --git a/tests/lib/rules/no-ref-as-operand.js b/tests/lib/rules/no-ref-as-operand.js index 04234eff7..9db2ab3a0 100644 --- a/tests/lib/rules/no-ref-as-operand.js +++ b/tests/lib/rules/no-ref-as-operand.js @@ -168,6 +168,22 @@ tester.run('no-ref-as-operand', rule, { } `, + ` + + `, + ` + + `, `