Linting
This commit is contained in:
parent
f718be61e9
commit
0a13023bfb
|
@ -265,7 +265,10 @@
|
|||
"require-jsdoc": "off",
|
||||
"require-unicode-regexp": "error",
|
||||
"rest-spread-spacing": "error",
|
||||
"semi": "off",
|
||||
"semi": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"semi-spacing": [
|
||||
"error",
|
||||
{
|
||||
|
|
|
@ -155,7 +155,7 @@ function keepAlive(responseAndIsES) {
|
|||
responseAndIsES[1]
|
||||
? ":\n\n"
|
||||
: "2[]"
|
||||
)
|
||||
);
|
||||
}, KEEP_ALIVE);
|
||||
}
|
||||
|
||||
|
@ -240,22 +240,18 @@ Game.prototype.playerJoined = function (playerName) {
|
|||
for (var player in this.racks) {
|
||||
if (Object.prototype.hasOwnProperty.call(this.racks, player)) {
|
||||
player = player.slice(1); // '#'
|
||||
players.push(
|
||||
{
|
||||
player: player,
|
||||
score: this.getPlayerScore(player),
|
||||
rackCount: countTiles(this.getPlayerRack(player))
|
||||
}
|
||||
);
|
||||
players.push({
|
||||
player: player,
|
||||
score: this.getPlayerScore(player),
|
||||
rackCount: countTiles(this.getPlayerRack(player))
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.pendingEvents.push(
|
||||
{
|
||||
players: players,
|
||||
date: dateNow
|
||||
}
|
||||
);
|
||||
this.pendingEvents.push({
|
||||
players: players,
|
||||
date: dateNow
|
||||
});
|
||||
};
|
||||
|
||||
Game.prototype.addListeningPlayer = function (playerName, responseAndIsES) {
|
||||
|
@ -435,7 +431,7 @@ function handleCommand(cmd, gameNumber, playerName, response) {
|
|||
|
||||
response.write(
|
||||
JSON.stringify({
|
||||
"error":0,
|
||||
"error": 0,
|
||||
"gameNumber": gameNumber,
|
||||
"playerName": playerName,
|
||||
"rack": game.getPlayerRack(playerName),
|
||||
|
|
|
@ -566,7 +566,7 @@
|
|||
},
|
||||
row.lastChild.textContent
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
)(row);
|
||||
|
||||
|
@ -644,7 +644,7 @@
|
|||
while (participants.rows[1]) {
|
||||
participants.removeChild(participants.rows[1]);
|
||||
}
|
||||
sendCmds([{"cmd":"hello"}])
|
||||
sendCmds([{"cmd":"hello"}]);
|
||||
break;
|
||||
|
||||
case "moveLetter":
|
||||
|
@ -676,7 +676,7 @@
|
|||
setTimeout(sendCmds.bind(null, []), POLLING_DELAY);
|
||||
} else {
|
||||
retriedImmediately = true;
|
||||
sendCmds()
|
||||
sendCmds();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -901,7 +901,7 @@
|
|||
[{cmd: "resetGame"}]
|
||||
);
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
function clearRack() {
|
||||
|
|
Loading…
Reference in New Issue