mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 15:43:13 +09:00
Fix misc problems detected by ESLint
Reformat and clean up issues detected by ESLint.
This commit is contained in:
1 parent
8cb21c5fa8
commit
e9f5cae4f0
34 files changed
+132
-189
No files matched your search
+10
-8
@@ -11,8 +11,8 @@ const errors = require("lib/errors");
|
||||
class Message {
|
||||
/**
|
||||
* Name of the plugin this message belongs to, or null.
|
||||
* @returns {?string}
|
||||
**/
|
||||
* @returns {?string} - plugin name or null if not from a plugin.
|
||||
*/
|
||||
get plugin() {
|
||||
if (this._plugin === undefined) {
|
||||
let index = this.type.indexOf(":");
|
||||
@@ -78,9 +78,10 @@ class Request extends Message {
|
||||
}
|
||||
|
||||
if (forwardTo === "instance") {
|
||||
requestProperties = Object.assign(
|
||||
{ "instance_id": { type: "integer" }}, requestProperties
|
||||
);
|
||||
requestProperties = {
|
||||
"instance_id": { type: "integer" },
|
||||
...requestProperties,
|
||||
};
|
||||
|
||||
} else if (forwardTo !== "master" && forwardTo !== null) {
|
||||
throw new Error(`Invalid forwardTo value ${forwardTo}`);
|
||||
@@ -635,9 +636,10 @@ class Event extends Message {
|
||||
this.broadcastTo = broadcastTo;
|
||||
|
||||
if (forwardTo === "instance") {
|
||||
eventProperties = Object.assign(
|
||||
{ "instance_id": { type: "integer" }}, eventProperties
|
||||
);
|
||||
eventProperties = {
|
||||
"instance_id": { type: "integer" },
|
||||
...eventProperties,
|
||||
};
|
||||
|
||||
} else if (forwardTo !== "master" && forwardTo !== null) {
|
||||
throw new Error(`Invalid forwardTo value ${forwardTo}`);
|
||||
|
||||
Reference in new issue
Block a user