2 * @fileoverview Warn when using template string syntax in regular strings
3 * @author Jeroen Engels
7 //------------------------------------------------------------------------------
9 //------------------------------------------------------------------------------
16 description
: "disallow template literal placeholder syntax in regular strings",
18 url
: "https://eslint.org/docs/rules/no-template-curly-in-string"
24 unexpectedTemplateExpression
: "Unexpected template string expression."
29 const regex
= /\$\{[^}]+\}/u;
33 if (typeof node
.value
=== "string" && regex
.test(node
.value
)) {
36 messageId
: "unexpectedTemplateExpression"