mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 07:24:53 +09:00
Add dangling commas
Ensure multiline object and array litterals are consistenly typed out with dangling commas for the last element.
This commit is contained in:
1 parent
3e4f0b6b5e
commit
8cb21c5fa8
16 files changed
+69
-69
No files matched your search
@@ -28,7 +28,7 @@ MasterGroup.define({
|
||||
title: "HTTP Port",
|
||||
description: "Port to listen for HTTP connections on, set to null to not listen for HTTP connections.",
|
||||
type: "number",
|
||||
optional: true
|
||||
optional: true,
|
||||
});
|
||||
MasterGroup.define({
|
||||
name: "https_port",
|
||||
@@ -139,7 +139,7 @@ SlaveGroup.define({
|
||||
name: "factorio_directory",
|
||||
description: "Path to directory to look for factorio installs",
|
||||
type: "string",
|
||||
initial_value: "factorio"
|
||||
initial_value: "factorio",
|
||||
});
|
||||
SlaveGroup.define({
|
||||
name: "instances_directory",
|
||||
|
||||
@@ -375,7 +375,7 @@ const outputHeuristics = [
|
||||
filter: { type: "log", message: /^updateTick\(\d+\) changing state from\(CreatingGame\) to\(InGame\)$/ },
|
||||
action: function(output) {
|
||||
this._notifyGameReady().catch((err) => { this.emit("error", err); });
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
// Message indicating the server has started an autosave
|
||||
@@ -414,14 +414,14 @@ const outputHeuristics = [
|
||||
},
|
||||
action: function(output) {
|
||||
this.emit("_saved");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
// Message indicating the server is shutting down
|
||||
{
|
||||
filter: {
|
||||
type: "generic",
|
||||
message: /^Quitting: /
|
||||
message: /^Quitting: /,
|
||||
},
|
||||
action: function(output) {
|
||||
this.emit("_quitting");
|
||||
@@ -432,7 +432,7 @@ const outputHeuristics = [
|
||||
if (process.platform === "win32" && output.message === "Quitting: multiplayer error.") {
|
||||
this._server.kill();
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
// Messages that might be tha cause of an unexpected shutdown.
|
||||
@@ -1047,7 +1047,7 @@ class FactorioServer extends events.EventEmitter {
|
||||
path: {
|
||||
"read-data": this.dataPath(),
|
||||
"write-data": this.writePath(),
|
||||
}
|
||||
},
|
||||
});
|
||||
await fs.outputFile(this.writePath("config.ini"), content);
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ class Request extends Message {
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -448,7 +448,7 @@ messages.sendRcon = new Request({
|
||||
},
|
||||
responseProperties: {
|
||||
"result": { type: "string" },
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
messages.listPermissions = new Request({
|
||||
@@ -503,7 +503,7 @@ messages.createRole = new Request({
|
||||
},
|
||||
responseProperties: {
|
||||
"id": { type: "integer" },
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
messages.updateRole = new Request({
|
||||
@@ -697,7 +697,7 @@ class Event extends Message {
|
||||
if (
|
||||
this.broadcastTo === "instance"
|
||||
&& [
|
||||
"instance-slave", "slave-master", "control-master", "master-slave"
|
||||
"instance-slave", "slave-master", "control-master", "master-slave",
|
||||
].includes(`${link.target}-${link.source}`)
|
||||
) {
|
||||
if (!handler) {
|
||||
@@ -759,7 +759,7 @@ messages.instanceInitialized = new Event({
|
||||
"plugins": {
|
||||
type: "object",
|
||||
additionalProperties: { type: "string" },
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
messages.instanceStarted = new Event({
|
||||
|
||||
@@ -54,7 +54,7 @@ async function listMods(config, instance) {
|
||||
factorioAPI.authenticate({
|
||||
username: config.username,
|
||||
token: config.token,
|
||||
require_ownership: false
|
||||
require_ownership: false,
|
||||
}).then(token => {
|
||||
console.log("* Currently installed:");
|
||||
factorioAPI.readModZips().then(list => {
|
||||
@@ -84,7 +84,7 @@ async function listMods(config, instance) {
|
||||
factorioAPI.authenticate({
|
||||
username: config.username,
|
||||
token: config.token,
|
||||
require_ownership: false
|
||||
require_ownership: false,
|
||||
}).then(() => {
|
||||
console.log("\r\n");
|
||||
console.log("* Mods shared by all instances:");
|
||||
@@ -119,7 +119,7 @@ async function findMods(config, searchTerm) {
|
||||
factorioAPI.authenticate({
|
||||
username: config.username,
|
||||
token: config.token,
|
||||
require_ownership: false
|
||||
require_ownership: false,
|
||||
}).then(token => {
|
||||
factorioAPI.searchMods(searchTerm).then(mods => {
|
||||
let result = asTable(mods.reverse().map(mod => {
|
||||
@@ -157,7 +157,7 @@ async function addMod(config, term, instance) {
|
||||
factorioAPI.authenticate({
|
||||
username: config.username,
|
||||
token: config.token,
|
||||
require_ownership: false
|
||||
require_ownership: false,
|
||||
}).then(() => {
|
||||
factorioAPI.searchMods(term.split("/")[term.split("/").length-1]).then(body => {
|
||||
console.log("Im gonna download: "+body[0].name + " in version: " + body[0].latest_release.version);
|
||||
@@ -202,7 +202,7 @@ async function addMod(config, term, instance) {
|
||||
factorioAPI.authenticate({
|
||||
username: config.username,
|
||||
token: config.token,
|
||||
require_ownership: false
|
||||
require_ownership: false,
|
||||
}).then(() => {
|
||||
factorioAPI.searchMods(term).then(body => {
|
||||
console.log(body);
|
||||
|
||||
+2
-2
@@ -88,7 +88,7 @@ const serverHandshake = ajv.compile({
|
||||
type: "object",
|
||||
additionalProperties: { type: "string" },
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -169,7 +169,7 @@ const clientHandshake = ajv.compile({
|
||||
"token": { type: "string" },
|
||||
"agent": { type: "string" },
|
||||
"version": { type: "string" },
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user