2 * @fileoverview Warn when using template string syntax in regular strings
3 * @author Jeroen Engels
7 //------------------------------------------------------------------------------
9 //------------------------------------------------------------------------------
11 /** @type {import('../shared/types').Rule} */
17 description
: "disallow template literal placeholder syntax in regular strings",
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"