From 16c65fc110a4846281e9737eb69c3c193b20da98 Mon Sep 17 00:00:00 2001 From: Dustin Brett Date: Thu, 14 Nov 2024 13:44:52 -0800 Subject: [PATCH] Stricter compiling --- components/apps/Messenger/SanitizedContent.tsx | 4 ++-- components/pages/ErrorBoundary.ts | 4 ++-- pages/_document.tsx | 4 ++-- tsconfig.json | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/components/apps/Messenger/SanitizedContent.tsx b/components/apps/Messenger/SanitizedContent.tsx index 22fb2cd2..0f61c5b1 100644 --- a/components/apps/Messenger/SanitizedContent.tsx +++ b/components/apps/Messenger/SanitizedContent.tsx @@ -1,4 +1,4 @@ -import { sanitize } from "dompurify"; +import DOMPurify from "dompurify"; import { useMemo } from "react"; import { convertImageLinksToHtml, @@ -21,7 +21,7 @@ const SanitizedContent: FC<{ content: string; decrypted: boolean }> = ({
{ return withStyledComponents(ctx); } - public render(): React.JSX.Element { + public override render(): React.JSX.Element { return ( diff --git a/tsconfig.json b/tsconfig.json index 7c93a4ad..163b222e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "allowJs": true, + "allowUnreachableCode": false, "baseUrl": ".", "esModuleInterop": true, "forceConsistentCasingInFileNames": true, @@ -11,6 +12,7 @@ "module": "esnext", "moduleResolution": "node", "noEmit": true, + "noImplicitOverride": true, "noImplicitReturns": true, "plugins": [{ "name": "next" }], "resolveJsonModule": true,