ESLint has a whole new config format, so I figure it's a good time to
make the config system saner.
- First, we no longer have separate eslint-no-types configs. Lint
performance shouldn't be enough of a problem to justify the
relevant maintenance complexity.
- Second, our base config should work out-of-the-box now. `npx eslint`
will work as expected, without any CLI flags. You should still use
`npm run lint` which adds the `--cached` flag for performance.
- Third, whatever updates I did fixed style linting, which apparently
has been bugged for quite some time, considering all the obvious
mixed-tabs-and-spaces issues I found in the upgrade.
Also here are some changes to our style rules. In particular:
- Curly brackets (for objects etc) now have spaces inside them. Sorry
for the huge change. ESLint doesn't support our old style, and most
projects use Prettier style, so we might as well match them in this way.
See https://github.com/eslint-stylistic/eslint-stylistic/issues/415
- String + number concatenation is no longer allowed. We now
consistently use template strings for this.
* Trivia: Fix crash and Number mode game cap
Discussed with Trivia auth.
Fixes an issue in Number mode where the game fails to end after a specified amount of questions, and fixes a crash caused by ending a game with no participation
* Update server/chat-plugins/trivia/trivia.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
---------
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
This reinstates the recently-reverted RoomGame refactor/cleanup, but
with the bugs (forfeiting BestOfGame, and autojoin) fixed.
This reinstates:
- 6bccd4f622 Fix crash in bestof when expiring battles
- 2a48cbd064 Cleanup more RoomGame implementations
The latter fixes these, in addition to refactoring:
- Fix a race condition when destroying bestof games
- Fix `/tour settings scouting off` error message
This is mostly just refactoring, but the refactor caught a few bugs:
- Fix a race condition when destroying bestof games
- Fix `/tour settings scouting off` error message
This refactor removes `player.unlinkUser()` which was used for several
unrelated use cases.
These have been split apart into:
- at the end of a game, `game.setEnded()` now clears `user.games`,
while leaving `player.id` untouched
- when trying to change the user associated with the player, we now
consistently use the higher-level `game.updatePlayer()`
There's a good chance this fixes the lagspikes currently affecting PS.