Skip to content

Commit

Permalink
Docs: quotes rule - when does \n require backticks (#9135)
Browse files Browse the repository at this point in the history
  • Loading branch information
avimar authored and gyandeeps committed Aug 21, 2017
1 parent 60c5148 commit ffa021e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/rules/quotes.md
Expand Up @@ -44,6 +44,7 @@ Examples of **incorrect** code for this rule with the default `"double"` option:

var single = 'single';
var unescaped = 'a string containing "double" quotes';
var backtick = `back\ntick`; // you can use \n in single or double quoted strings
```

Examples of **correct** code for this rule with the default `"double"` option:
Expand All @@ -53,7 +54,8 @@ Examples of **correct** code for this rule with the default `"double"` option:
/*eslint-env es6*/

var double = "double";
var backtick = `back\ntick`; // backticks are allowed due to newline
var backtick = `back
tick`; // backticks are allowed due to newline
var backtick = tag`backtick`; // backticks are allowed due to tag
```

Expand Down

0 comments on commit ffa021e

Please sign in to comment.