Error: `'` can be escaped with `'`, `‘`, `'`, `’`. react/no-unescaped-entities
Unanswered
Black Tern posted this in #help-forum
Black TernOP
I am trying to run build to produce a static html export website of my next js project. But I get the error mentioned above. What is the recommended solution for this? Do I remove the linting or do I do something about single quotes in my jsx? Thanks
4 Replies
@Black Tern I am trying to run build to produce a static html export website of my next js project. But I get the error mentioned above. What is the recommended solution for this? Do I remove the linting or do I do something about single quotes in my jsx? Thanks
do I do something about single quotes in my jsxyes, escape them with
', ‘, ', or ’ as the error message suggestsBlack TernOP
Thanks joulev! Don't suppose you could provide any additional context as to why this is the right solution for my situation?
@Black Tern Thanks joulev! Don't suppose you could provide any additional context as to why this is the right solution for my situation?
the eslint rule documentation page explains it pretty well https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md
Black TernOP
Amazing thanks for your help Joulev!