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",
17 category: "Possible Errors",
19 url: "https://eslint.org/docs/rules/no-template-curly-in-string"
25 unexpectedTemplateExpression: "Unexpected template string expression."
30 const regex = /\$\{[^}]+\}/u;
34 if (typeof node.value === "string" && regex.test(node.value)) {
37 messageId: "unexpectedTemplateExpression"