Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmengels committed Aug 3, 2016
1 parent f49d519 commit 7f9f3a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/rules/no-template-curly-in-string.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Warn when using template string syntax in regular strings (no-template-curly-in-string)
# Disallow template literal placeholder syntax in regular strings (no-template-curly-in-string)

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, and end up with the literal value `"${variable}"` instead of a string containing the value of the injected expressions.
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.


## Rule Details

This rule aims to warn programmers of a potential quotes mismatch. It will warn when it finds a string containing the template literal place holder (`${something}`) that uses either `\"` or `\'` for the quotes.
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.

## Examples

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-template-curly-in-string.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
module.exports = {
meta: {
docs: {
description: "Warn when using template string syntax in regular strings",
description: "Disallow template literal placeholder syntax in regular strings",
category: "Possible Errors",
recommended: false
},
Expand Down

0 comments on commit 7f9f3a1

Please sign in to comment.