You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ECMAScript 6 allows programmers to create strings containing variable or expressions using template literals, instead of string concatenation, by writing expressions like ${variable} between two backtick quotes (). It can be easy to use the wrong quotes when wanting to use template literals, by writing "${variable}", and end up with the literal value "${variable}"` instead of a string containing the value of the injected expressions.
This rule aims to warn when a regular string contains what looks like a template literal placeholder. It will warn when it finds a string containing the template literal place holder (${something}) that uses either " or ' for the quotes.
I don't see fit for this restriction. There may not be failing repos, but that's not the case. It's pretty logical to have some template engine working with that to emulate it intentionally.
It's not my case, it's not a problem for me, just wanted to mention it.
ECMAScript 6 allows programmers to create strings containing variable or expressions using template literals, instead of string concatenation, by writing expressions like
${variable}
between two backtick quotes (). It can be easy to use the wrong quotes when wanting to use template literals, by writing
"${variable}", and end up with the literal value
"${variable}"` instead of a string containing the value of the injected expressions.This rule aims to warn when a regular string contains what looks like a template literal placeholder. It will warn when it finds a string containing the template literal place holder (
${something}
) that uses either"
or'
for the quotes.http://eslint.org/docs/rules/no-template-curly-in-string
Likely to be uncontroversial and only one test repo fails so I will merge this into
standard
v8 beta.The text was updated successfully, but these errors were encountered: