Unexpected expression of pattern string in Vue.js

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

Any help?

enter image description here

+5
source share
1 answer

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

'delete the item ${row.name}' 

Wherein:

 `delete the item ${row.name}` 

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

+7
source

Source: https://habr.com/ru/post/1261118/


All Articles