From ac3577455d3536a5452a6d79c358d585e2f0c6ba Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Tue, 13 Jul 2021 00:23:46 +0200 Subject: [PATCH] Satisfy eslint --- ts/reviewer/index.ts | 6 +++++- ts/reviewer/mathjax.ts | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ts/reviewer/index.ts b/ts/reviewer/index.ts index abb96a661..88ab8f3e0 100644 --- a/ts/reviewer/index.ts +++ b/ts/reviewer/index.ts @@ -1,6 +1,10 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html +/* eslint +@typescript-eslint/no-non-null-assertion: "off", + */ + import "css-browser-selector/css_browser_selector"; import "jquery/dist/jquery"; @@ -139,7 +143,7 @@ export function _showAnswer(a: string, bodyclass: string): void { // avoid scrolling to the answer until images load allImagesLoaded().then(scrollToAnswer); }, - function () {} + function () {/* noop */} ) ); } diff --git a/ts/reviewer/mathjax.ts b/ts/reviewer/mathjax.ts index f7f7546b6..7fcbcfcbf 100644 --- a/ts/reviewer/mathjax.ts +++ b/ts/reviewer/mathjax.ts @@ -7,7 +7,8 @@ import { RegisterHTMLHandler } from "mathjax-full/js/handlers/html"; import { AllPackages } from "mathjax-full/js/input/tex/AllPackages.js"; import "mathjax-full/js/util/entities/all"; -const adaptor = new HTMLAdaptor(window as any); +// @ts-expect-error Minor interface mismatch: document.documentElement.nodeValue might be null +const adaptor = new HTMLAdaptor(window); RegisterHTMLHandler(adaptor); const texOptions = {