From 6d2fc89bd145571a4997b9459670b44e84c754c4 Mon Sep 17 00:00:00 2001 From: Joe Lencioni Date: Thu, 4 Aug 2016 09:16:18 -0700 Subject: [PATCH] Add template literal "bad" example to single quotes guideline There has been some confusion around whether we should use single quotes or template literals. To help avoid this confusion, I am adding a "bad" example to the single quotes guideline. This rule is already enforced by the quotes linter rule. Generally, we want code to clearly express developer intention. Using template literals communicates that you intend to use some of the features that template literals offer (e.g. interpolation). Fixes #992 --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 353486cc..8422a4b2 100644 --- a/README.md +++ b/README.md @@ -475,6 +475,9 @@ Other Style Guides // bad const name = "Capt. Janeway"; + // bad - template literals should contain interpolation or newlines + const name = `Capt. Janeway`; + // good const name = 'Capt. Janeway'; ```