diff --git a/.eslintrc.json b/.eslintrc.json index fd6cc99fbd..b2319265ca 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -17,6 +17,7 @@ "rules": { "linebreak-style": ["error", "unix"], "no-duplicate-imports": "error", + "@typescript-eslint/no-empty-function": "off", "eqeqeq": "off", "prefer-const": "off", @@ -31,8 +32,6 @@ "prefer-spread": "off", "prefer-rest-params": "off", "no-useless-escape": "off", - "no-empty": "off", - "@typescript-eslint/no-empty-function": "off", "no-constant-condition": "off", "no-async-promise-executor": "off" } diff --git a/ui/analyse/src/serverSideUnderboard.ts b/ui/analyse/src/serverSideUnderboard.ts index 1ecfd7c779..8086ba5379 100644 --- a/ui/analyse/src/serverSideUnderboard.ts +++ b/ui/analyse/src/serverSideUnderboard.ts @@ -98,11 +98,7 @@ export default function (element: HTMLElement, ctrl: AnalyseCtrl) { .filter('.' + panel) .addClass('active'); if ((panel == 'move-times' || ctrl.opts.hunter) && !lichess.movetimeChart) - try { - lichess.loadScript('javascripts/chart/movetime.js').then(function () { - lichess.movetimeChart(data, ctrl.trans); - }); - } catch (e) {} + lichess.loadScript('javascripts/chart/movetime.js').then(() => lichess.movetimeChart(data, ctrl.trans)); if ((panel == 'computer-analysis' || ctrl.opts.hunter) && $('#acpl-chart').length) setTimeout(startAdvantageChart, 200); }; diff --git a/ui/ceval/src/ctrl.ts b/ui/ceval/src/ctrl.ts index 8c9feb9c15..0be4084ffc 100644 --- a/ui/ceval/src/ctrl.ts +++ b/ui/ceval/src/ctrl.ts @@ -72,7 +72,9 @@ export default function (opts: CevalOpts): CevalCtrl { try { sharedMem.grow(8); growableSharedMem = true; - } catch (e) {} + } catch (e) { + // memory growth not supported + } } } diff --git a/ui/site/src/challengePage.ts b/ui/site/src/challengePage.ts index 162eb8e449..91dd57be3b 100644 --- a/ui/site/src/challengePage.ts +++ b/ui/site/src/challengePage.ts @@ -61,9 +61,7 @@ export default function (opts: ChallengeOpts) { function pingNow() { if (document.getElementById('ping-challenge')) { - try { - lichess.socket.send('ping'); - } catch (e) {} + lichess.socket.send('ping'); setTimeout(pingNow, 9000); } }