Join the Stack Overflow Community
Stack Overflow is a community of 6.6 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

everytime I code like this ${row.name}, I get this error "eslint.org/docs/rules/no-template-curly-in-string Unexpected template string expression".

Any help?

enter image description here

share|improve this question
1  
    
All eslint errors and warnings have complete documentation pages. You should Google for the error, not ask on SO. – Andy Ray Dec 12 '16 at 3:42
up vote 2 down vote accepted

ES6 template strings should be used with backquotes, not single quotes. Replace this :

'delete the item ${row.name}'

With this :

`delete the item ${row.name}`

And here is the ESLint example as requested in the comments : http://eslint.org/docs/rules/no-template-curly-in-string#examples

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.