Use double quotes

Convert existing mix of double quotes and single quotes to only use
double quotes unless the string contains double quotes.
This commit is contained in:
Hornwitser committed 2020-06-17 20:53:18 +02:00
1 parent efd759bec5
commit 34aaeee354
48 files changed
+708 -712

No files matched your search

+5 -5
View File
@@ -47,7 +47,7 @@ class InvalidField extends Error { };
function splitOn(separator, string) {
let index = string.indexOf(separator);
if (index === -1) {
return [string, ''];
return [string, ""];
}
return [string.slice(0, index), string.slice(index + separator.length)];
}
@@ -152,7 +152,7 @@ class Config extends events.EventEmitter {
* Get the value for a config field
*/
get(name) {
let [group, field] = splitOn('.', name);
let [group, field] = splitOn(".", name);
return this.group(group).get(field);
}
@@ -160,7 +160,7 @@ class Config extends events.EventEmitter {
* Set the value for a config field
*/
set(name, value) {
let [group, field] = splitOn('.', name);
let [group, field] = splitOn(".", name);
return this.group(group).set(field, value);
}
@@ -168,7 +168,7 @@ class Config extends events.EventEmitter {
* Set property of an object value for a config field
*/
setProp(name, prop, value) {
let [group, field] = splitOn('.', name);
let [group, field] = splitOn(".", name);
return this.group(group).setProp(field, prop, value);
}
@@ -350,7 +350,7 @@ class ConfigGroup {
}
if (def.enum && !def.enum.includes(value)) {
throw new InvalidValue(`Expected one of [${def.enum.join(', ')}], not ${value}`);
throw new InvalidValue(`Expected one of [${def.enum.join(", ")}], not ${value}`);
}
if (basicType(value) === "string") {