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

+12 -12
View File
@@ -44,12 +44,12 @@ function findRoot(zip) {
if (root === null) {
root = pathRoot;
} else if (root !== pathRoot) {
throw new Error(`Zip contains multiple root folders`);
throw new Error("Zip contains multiple root folders");
}
});
if (root === null) {
throw new Error(`Empty zip file`);
throw new Error("Empty zip file");
}
return root;
@@ -66,13 +66,13 @@ function findRoot(zip) {
*/
function generateLoader(patchInfo) {
let lines = [
'-- Auto generated scenario module loader created by Clusterio',
'-- Modifications to this file will be lost when loaded in Clusterio',
"-- Auto generated scenario module loader created by Clusterio",
"-- Modifications to this file will be lost when loaded in Clusterio",
`clusterio_patch_number = ${patchInfo.patch_number}`,
'',
"",
'local event_handler = require("event_handler")',
'',
'-- Scenario modules',
"",
"-- Scenario modules",
];
for (let moduleName of patchInfo["scenario"]["modules"]) {
@@ -80,8 +80,8 @@ function generateLoader(patchInfo) {
}
lines.push(...[
'',
'-- Clusterio modules',
"",
"-- Clusterio modules",
]);
for (let module of patchInfo["modules"]) {
@@ -97,9 +97,9 @@ function generateLoader(patchInfo) {
}
// End last line with a newline
lines.push('');
lines.push("");
return lines.join('\n');
return lines.join("\n");
}
/**
@@ -253,7 +253,7 @@ async function patch(savePath, modules) {
"files": [],
}
let dirs = [[module.path, '']];
let dirs = [[module.path, ""]];
while (dirs.length) {
let [dir, relativeDir] = dirs.pop();
for (let entry of await fs.readdir(dir, { withFileTypes: true })) {