From 54b7034bf012a40b7bd5682af1f24c309aed1815 Mon Sep 17 00:00:00 2001 From: Niklas Fiekas Date: Wed, 7 Apr 2021 16:34:44 +0200 Subject: [PATCH] fix no-extra-boolean-cast --- .eslintrc.json | 1 - ui/game/src/view/status.ts | 2 +- ui/msg/src/view/actions.ts | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7e1ca6faab..99fa60af8e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -36,7 +36,6 @@ "no-self-assign": "off", "no-constant-condition": "off", "no-prototype-builtins": "off", - "no-extra-boolean-cast": "off", "no-async-promise-executor": "off" } } diff --git a/ui/game/src/view/status.ts b/ui/game/src/view/status.ts index c3227224e0..4d05858231 100644 --- a/ui/game/src/view/status.ts +++ b/ui/game/src/view/status.ts @@ -26,7 +26,7 @@ export default function status(ctrl: Ctrl): string { return noarg('draw'); case 'outoftime': return `${d.game.turns % 2 === 0 ? noarg('whiteTimeOut') : noarg('blackTimeOut')}${ - !!d.game.winner ? '' : ` • ${noarg('draw')}` + d.game.winner ? '' : ` • ${noarg('draw')}` }`; case 'noStart': return (d.game.winner == 'white' ? 'Black' : 'White') + " didn't move"; diff --git a/ui/msg/src/view/actions.ts b/ui/msg/src/view/actions.ts index 1de203441a..79a15eea6a 100644 --- a/ui/msg/src/view/actions.ts +++ b/ui/msg/src/view/actions.ts @@ -51,7 +51,7 @@ export default function renderActions(ctrl: MsgCtrl, convo: Convo): VNode[] { hook: bind('click', withConfirm(ctrl.delete)), }) ); - if (!!convo.msgs[0]) + if (convo.msgs[0]) nodes.push( h(`button.${cls}.bad`, { key: 'report',