The following issues were found by ESLint within the gui/lobby and gui/gamesetup directories:
$ ./node_modules/.bin/eslint -c build/jenkins/lint-config/eslintrc.json binaries/data/mods/public/gui/lobby/ /0ad-git/binaries/data/mods/public/gui/lobby/lobby.js 50:41 warning Multiple spaces found before '"status"' no-multi-spaces 51:15 warning Extra space before value for key 'away' key-spacing 51:41 warning Multiple spaces found before '"status"' no-multi-spaces 52:15 warning Extra space before value for key 'playing' key-spacing 52:41 warning Multiple spaces found before '"status"' no-multi-spaces 53:15 warning Extra space before value for key 'offline' key-spacing 53:41 warning Multiple spaces found before '"status"' no-multi-spaces 54:15 warning Extra space before value for key 'unknown' key-spacing 222:1 warning Expected indentation of 5 tabs but found 4 indent 223:1 warning Expected indentation of 6 tabs but found 5 indent 224:1 warning Expected indentation of 7 tabs but found 6 indent 225:1 warning Expected indentation of 7 tabs but found 6 indent 226:1 warning Expected indentation of 6 tabs but found 4 indent 227:1 warning Expected indentation of 7 tabs but found 5 indent 228:1 warning Expected indentation of 8 tabs but found 6 indent 229:1 warning Expected indentation of 8 tabs but found 6 indent 230:1 warning Expected indentation of 7 tabs but found 5 indent 231:1 warning Expected indentation of 8 tabs but found 6 indent 232:1 warning Expected indentation of 8 tabs but found 6 indent 1035:3 warning Expected a default case default-case ✖ 20 problems (0 errors, 20 warnings) 0 errors and 19 warnings potentially fixable with the `--fix` option. $ ./node_modules/.bin/eslint -c build/jenkins/lint-config/eslintrc.json binaries/data/mods/public/gui/gamesetup /0ad-git/binaries/data/mods/public/gui/gamesetup/gamesetup.js 65:1 warning Expected indentation of 1 tab but found 2 indent 66:1 warning Expected indentation of 1 tab but found 2 indent 67:1 warning Expected indentation of 0 tabs but found 1 indent 68:1 warning Expected indentation of 1 tab but found 2 indent 69:1 warning Expected indentation of 2 tabs but found 3 indent 70:1 warning Expected indentation of 2 tabs but found 3 indent 71:1 warning Expected indentation of 1 tab but found 2 indent 72:1 warning Expected indentation of 0 tabs but found 1 indent 81:1 warning Expected indentation of 1 tab but found 2 indent 82:1 warning Expected indentation of 1 tab but found 2 indent 83:1 warning Expected indentation of 1 tab but found 2 indent 84:1 warning Expected indentation of 1 tab but found 2 indent 85:1 warning Expected indentation of 0 tabs but found 1 indent 86:1 warning Expected indentation of 1 tab but found 2 indent 87:1 warning Expected indentation of 2 tabs but found 3 indent 88:1 warning Expected indentation of 1 tab but found 2 indent 89:1 warning Expected indentation of 2 tabs but found 3 indent 90:1 warning Expected indentation of 2 tabs but found 3 indent 91:1 warning Expected indentation of 2 tabs but found 3 indent 92:1 warning Expected indentation of 2 tabs but found 3 indent 93:1 warning Expected indentation of 1 tab but found 2 indent 94:1 warning Expected indentation of 0 tabs but found 1 indent 1331:38 warning Trailing spaces not allowed no-trailing-spaces ✖ 23 problems (0 errors, 23 warnings) 0 errors and 23 warnings potentially fixable with the `--fix` option.
I then let ESLint auto-fix the style issues by running eslint --fix … with the same parameters.
Manual changes: lobby
The default-case in updateGameList() required manual intervention. The function sorts the games based on the currently selected column from gamesBox, but lacks a default behaviour (in case the column is unknown or not handled).
I've updated it to make sorting by the name column the default behaviour, which matches what we already do in updatePlayerList() for example.
Manual changes: gamesetup
(None.)