Reputation: 103
I am using ESLint to format my Javascript code. There I have the following piece of code:
'<div id="' + sId + '" ';
...
I get an ESLint warning telling me 'Strings should use double quotes', so I went ahead and changed the surrounding single quotes to double quotes and escaped the inner double quote. This lead to an ESLint error, which suggested I use the single quotes exactly as you see above.
Is there a way to solve this conflict so that I don't get the error or the warning? Info: I am stuck with ES5.
Many thanks in advance!
Upvotes: 0
Views: 934
Reputation: 943696
You can:
"<div id=\"" + sId + "\" ";
)Upvotes: 1