Add Prettier and ESLint tooling (Refs #77)

This commit is contained in:
2026-10-09 15:56:13 -04:00
parent 8ed059b8d3
commit 16469e2d43
711 changed files with 99737 additions and 28286 deletions
+16 -2
View File
@@ -17,7 +17,14 @@ describe('decodeRconError', () => {
});
it('recognizes every known reason code', () => {
for (const r of ['no-config', 'no-port', 'send-error', 'timeout', 'bad-reply', 'no-players'] as const) {
for (const r of [
'no-config',
'no-port',
'send-error',
'timeout',
'bad-reply',
'no-players'
] as const) {
expect(decodeRconError(`${r}:whatever`)?.reason).toBe(r);
}
});
@@ -33,7 +40,14 @@ describe('decodeRconError', () => {
describe('rconFixHint', () => {
it('returns a non-empty hint for every failure reason', () => {
for (const r of ['no-config', 'no-port', 'send-error', 'timeout', 'bad-reply', 'no-players'] as const) {
for (const r of [
'no-config',
'no-port',
'send-error',
'timeout',
'bad-reply',
'no-players'
] as const) {
expect(rconFixHint(r).length).toBeGreaterThan(0);
}
});