Answer the question
In order to leave comments, you need to log in
Unexpected template string expression (no-template-curly-in-string)?
this is my code
const y = "`${x()}${y()}`"
I am getting Unexpected template string expression(no-template-curly-in-string) warning. how to get rid of the warning?
Answer the question
In order to leave comments, you need to log in
If you really want to store a template string in a string (
"это строка `а это шаблонная строка внутри строки ${а тут переменная, которая не будет работать, потому что шаблонная строка находится в строке}` и это строка"
), then there are two options - either turn off the rule in .eslinrc, or turn off the rule for this particular line of code (google eslint disable comment).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question