Skip to content

Commit

Permalink
refactor: remove old comment
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Nov 14, 2021
1 parent 00d053c commit 8195370
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/rules/prefer-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,6 @@ module.exports = {
*/
function getTemplateLiteral(currentNode, textBeforeNode, textAfterNode) {
if (currentNode.type === "Literal" && typeof currentNode.value === "string") {

/*
* If the current node is a string literal, escape any instances of ${ or ` to prevent them from being interpreted
* as a template placeholder. However, if the code already contains a backslash before the ${ or `
* for some reason, don't add another backslash, because that would change the meaning of the code (it would cause
* an actual backslash character to appear before the dollar sign).
*/
return `\`${escapeTemplatePlaceholders(currentNode.raw)}\``;
}

Expand Down

0 comments on commit 8195370

Please sign in to comment.