Connect, collaborate, and grow with a community of TypeScript developers
added strict mode (#291)
ggrandibed5e8a38223
diff --git a/src/components/challenge/code-panel/index.tsx b/src/components/challenge/code-panel/index.tsxindex 37e89efc..b67ed9e4 100644--- a/src/components/challenge/code-panel/index.tsx+++ b/src/components/challenge/code-panel/index.tsx@@ -111,6 +111,13 @@ export const CodePanel = (props: Props) => {(value: string, onError: (v: TsErrors) => void) =>// eslint-disable-next-line @typescript-eslint/consistent-type-importsasync (editor: monaco.editor.IStandaloneCodeEditor, monaco: typeof import('monaco-editor')) => {+ monaco.languages.typescript.typescriptDefaults.setCompilerOptions({+ ...monaco.languages.typescript.typescriptDefaults.getCompilerOptions(),+ strict: true,+ target: monaco.languages.typescript.ScriptTarget.ESNext,+ strictNullChecks: true,+ })+if (!monaco.editor.getModel(monaco.Uri.parse(LIB_URI))) {monaco.languages.typescript.javascriptDefaults.addExtraLib(libSource, LIB_URI);monaco.editor.createModel(libSource, 'typescript', monaco.Uri.parse(LIB_URI));diff --git a/src/components/wizard/DescriptionEditor.tsx b/src/components/wizard/DescriptionEditor.tsxindex 0987d545..a606417a 100644--- a/src/components/wizard/DescriptionEditor.tsx+++ b/src/components/wizard/DescriptionEditor.tsx@@ -1,7 +1,7 @@'use client';import { useWatch } from 'react-hook-form';-import { WizardForm } from '.';+import { type WizardForm } from '.';import { FormField, FormItem, FormMessage } from '../ui/form';import { Markdown } from '../ui/markdown';import { RichMarkdownEditor } from '../ui/rich-markdown-editor';diff --git a/src/components/wizard/create.action.ts b/src/components/wizard/create.action.tsindex 67fb25aa..cde2ac2c 100644--- a/src/components/wizard/create.action.ts+++ b/src/components/wizard/create.action.ts@@ -2,7 +2,7 @@import { prisma } from '~/server/db';import { getServerAuthSession } from '~/server/auth';-import { CreateChallengeSchema } from '.';+import { type CreateChallengeSchema } from '.';export async function uploadChallenge(data: CreateChallengeSchema) {const session = await getServerAuthSession();