mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2025-12-06 00:20:05 +01:00
Stricter compiling
This commit is contained in:
parent
81d4cde594
commit
16c65fc110
|
|
@ -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 }> = ({
|
|||
<div
|
||||
// eslint-disable-next-line react/no-danger
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: sanitize(decryptedContent || content, {
|
||||
__html: DOMPurify.sanitize(decryptedContent || content, {
|
||||
ALLOWED_ATTR: ["src"],
|
||||
ALLOWED_TAGS: ["br", "img"],
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export class ErrorBoundary extends Component<
|
|||
this.state = { hasError: false };
|
||||
}
|
||||
|
||||
public shouldComponentUpdate(): boolean {
|
||||
public override shouldComponentUpdate(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ export class ErrorBoundary extends Component<
|
|||
return { hasError: true };
|
||||
}
|
||||
|
||||
public render(): React.ReactNode {
|
||||
public override render(): React.ReactNode {
|
||||
const {
|
||||
props: { children, FallbackRender },
|
||||
state: { hasError },
|
||||
|
|
|
|||
|
|
@ -33,13 +33,13 @@ const withStyledComponents = async (
|
|||
};
|
||||
|
||||
class Document extends NextDocument {
|
||||
public static async getInitialProps(
|
||||
public static override async getInitialProps(
|
||||
ctx: DocumentContext
|
||||
): Promise<DocumentInitialProps> {
|
||||
return withStyledComponents(ctx);
|
||||
}
|
||||
|
||||
public render(): React.JSX.Element {
|
||||
public override render(): React.JSX.Element {
|
||||
return (
|
||||
<Html lang={DEFAULT_LOCALE}>
|
||||
<Head />
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user