"indent-legacy": "off",
"init-declarations": "off",
"jsx-quotes": "error",
- "key-spacing": "off",
+ "key-spacing": [
+ "error", {
+ "afterColon": true,
+ "mode": "minimum"
+ }
+ ],
"keyword-spacing": [
"error", {
"before": true,
"max-lines": "off",
"max-lines-per-function": "off",
"max-nested-callbacks": "error",
- "max-params": "error",
+ "max-params": ["error", {"max": 4}],
"max-statements": "off",
"max-statements-per-line": "error",
"multiline-comment-style": "off",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "off",
- "quote-props": "off",
+ "quote-props": [2, "as-needed"],
"quotes": [
"error",
"double", {
"Z"
];
+/* eslint-disable quote-props */
+
const frValues = {
" ": 0,
"E": 1,
"Z": 10
};
+/* eslint-enable quote-props */
const games = {};
Game.prototype.setCell = function (index, letter, player) {
this.board[index] = letter;
this.pendingEvents.push({
- player:player,
- action:"setCell",
- indexTo:index,
- letter:letter
+ player: player,
+ action: "setCell",
+ indexTo: index,
+ letter: letter
});
};
res = parseInt(res);
if (!isNaN(res)) {
sendCmds([{
- cmd:"score",
- player:row.firstChild.textContent,
+ cmd: "score",
+ player: row.firstChild.textContent,
score: res
}]);
}
while (participants.rows[1]) {
participants.removeChild(participants.rows[1]);
}
- sendCmds([{"cmd":"hello"}]);
+ sendCmds([{cmd: "hello"}]);
break;
case "moveLetter":
}
const specialTypesText = {
- "doubleLetter" : _("Double\nLetter"),
- "doubleWord" : _("Double\nWord"),
- "tripleLetter" : _("Triple\nLetter"),
- "tripleWord" : _("Triple\nWord")
+ doubleLetter: _("Double\nLetter"),
+ doubleWord: _("Double\nWord"),
+ tripleLetter: _("Triple\nLetter"),
+ tripleWord: _("Triple\nWord")
};
function specialCell(type, cell) {
myAlert(_("You cannot take another tile: your rack is full."));
} else {
sendCmds(
- [{cmd:"moveLetter", from: "bag", to: "rack", indexTo: index}]
+ [{cmd: "moveLetter", from: "bag", to: "rack", indexTo: index}]
);
}
}
const letters = "ABCDEFGHIJKLMNO";
const doubleLetter = {
- "0,3" : true,
+ "0,3": true,
"0,11": true,
- "2,6" : true,
- "2,8" : true,
- "3,0" : true,
- "3,7" : true,
+ "2,6": true,
+ "2,8": true,
+ "3,0": true,
+ "3,7": true,
"3,14": true,
- "6,2" : true,
- "6,6" : true,
- "6,8" : true,
+ "6,2": true,
+ "6,6": true,
+ "6,8": true,
"6,12": true
};