Lint
This commit is contained in:
parent
2fc231dfec
commit
26df4d3414
|
@ -93,7 +93,12 @@
|
|||
"indent-legacy": "off",
|
||||
"init-declarations": "off",
|
||||
"jsx-quotes": "error",
|
||||
"key-spacing": "off",
|
||||
"key-spacing": [
|
||||
"error", {
|
||||
"afterColon": true,
|
||||
"mode": "minimum"
|
||||
}
|
||||
],
|
||||
"keyword-spacing": [
|
||||
"error", {
|
||||
"before": true,
|
||||
|
@ -114,7 +119,7 @@
|
|||
"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",
|
||||
|
@ -258,7 +263,7 @@
|
|||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error",
|
||||
"prefer-template": "off",
|
||||
"quote-props": "off",
|
||||
"quote-props": [2, "as-needed"],
|
||||
"quotes": [
|
||||
"error",
|
||||
"double", {
|
||||
|
|
|
@ -84,6 +84,8 @@ const frBag = [
|
|||
"Z"
|
||||
];
|
||||
|
||||
/* eslint-disable quote-props */
|
||||
|
||||
const frValues = {
|
||||
" ": 0,
|
||||
"E": 1,
|
||||
|
@ -114,6 +116,7 @@ const frValues = {
|
|||
"Z": 10
|
||||
};
|
||||
|
||||
/* eslint-enable quote-props */
|
||||
|
||||
const games = {};
|
||||
|
||||
|
@ -419,10 +422,10 @@ Game.prototype.getCell = function (index) {
|
|||
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
|
||||
});
|
||||
};
|
||||
|
||||
|
|
32
trivabble.js
32
trivabble.js
|
@ -763,8 +763,8 @@
|
|||
res = parseInt(res);
|
||||
if (!isNaN(res)) {
|
||||
sendCmds([{
|
||||
cmd:"score",
|
||||
player:row.firstChild.textContent,
|
||||
cmd: "score",
|
||||
player: row.firstChild.textContent,
|
||||
score: res
|
||||
}]);
|
||||
}
|
||||
|
@ -856,7 +856,7 @@
|
|||
while (participants.rows[1]) {
|
||||
participants.removeChild(participants.rows[1]);
|
||||
}
|
||||
sendCmds([{"cmd":"hello"}]);
|
||||
sendCmds([{cmd: "hello"}]);
|
||||
break;
|
||||
|
||||
case "moveLetter":
|
||||
|
@ -1192,10 +1192,10 @@
|
|||
}
|
||||
|
||||
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) {
|
||||
|
@ -1267,7 +1267,7 @@
|
|||
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}]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1498,16 +1498,16 @@
|
|||
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
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue