],
"callback-return": "error",
"camelcase": "error",
- "capitalized-comments": [
- "error",
- "always"
- ],
+ "capitalized-comments": "off",
"class-methods-use-this": "error",
"comma-dangle": "error",
"comma-spacing": [
}
letter = rack[cmd.indexFrom];
- operations.push(() => {rack[cmd.indexFrom] = "";});
+ operations.push(() => {
+ rack[cmd.indexFrom] = "";
+ });
break;
case "board":
return false;
}
- operations.push(() => {letter = game.bagPopLetter(playerName);});
+ operations.push(() => {
+ letter = game.bagPopLetter(playerName);
+ });
break;
default:
return false;
}
- operations.push(() => {rack[cmd.indexTo] = letter;});
+ operations.push(() => {
+ rack[cmd.indexTo] = letter;
+ });
break;
case "board":
response.write(
JSON.stringify({
- error:0,
- rack: (cmd.from === "bag" && cmd.to === "rack") ? rack : undefined,
+ error: 0,
+ rack: (cmd.from === "bag" && cmd.to === "rack") ? rack : undefined, // eslint-disable-line no-undefined
remainingLetters: game.bag.length
})
);
setConf("MAX_WEBSOCKET_ERRORS", 1);
setConf("APP_PATH", "");
- const _ = (window.libD && libD.l10n) ? libD.l10n() : function (s) {return s;};
+ const _ = (window.libD && libD.l10n) ? libD.l10n() : function (s) {
+ return s;
+ };
const trivabble = window.trivabble = {l10n: _};
if (moveCMD.to === moveCMD.from) {
if (moveCMD.indexTo !== moveCMD.indexFrom) {
- if (moveCMD.from === "rack") {
- sendCmds([moveRack]);
- } else {
- sendCmds([moveCMD]);
- }
+ sendCmds([
+ (moveCMD.from === "rack")
+ ? moveRack
+ : moveCMD
+ ]);
}
} else if (moveCMD.to === "rack") {
moveRack.rack[moveCMD.indexTo] = "";
type: "rack",
rack: letters.map(
function (tile) {
- return tile.querySelector(".tile-letter").textContent
+ return tile.querySelector(".tile-letter").textContent;
}
)
}