From 706ffd9ed278f635124a59d3dbc64d1b2369caae Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Fri, 3 Apr 2020 16:18:44 +0200 Subject: [PATCH] Detail usage of single and double quoted strings Add section to contributing guidelines detailing that single quoted strings should not be used. The use of it has only resulted in the addition of more inconsistency to the codebase. --- docs/contributing.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/contributing.md b/docs/contributing.md index c72548ea..7deb413b 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -176,7 +176,19 @@ Code Style ---------- The style of the code is a bit of a mixed bag at the moment. But there -are at least two things that have been agreed upon. +are at least a few things that have been agreed upon. + + +### Strings + +JavaScript and Lua code should use double quoted strings (`"string"`) +for all strings with the only exception that strings that contain double +quotes may use single quotes (i.e., `'String with "quotes"'`.) For +JavaScript template literals may also be used where appropriate. + +There are places in the codebase that are using `'single'` quoted +strings. Should you be modifying such code use double quotes on new and +modified lines and leave the rest untouched. ### Indenting