fix: remove editor red squiggly lines
by dynamically loading project's tsconfig file and adding nice defaults # Conflicts: # frontend/components/editor/index.tsx # frontend/lib/utils.ts
This commit is contained in:
parent
224d190468
commit
8b890fdffe
@ -1228,4 +1228,17 @@ export default function CodeEditor({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the typescript compiler to detect JSX and load type definitions
|
||||||
|
*/
|
||||||
|
const defaultCompilerOptions: monaco.languages.typescript.CompilerOptions = {
|
||||||
|
allowJs: true,
|
||||||
|
allowSyntheticDefaultImports: true,
|
||||||
|
allowNonTsExtensions: true,
|
||||||
|
resolveJsonModule: true,
|
||||||
|
|
||||||
|
jsx: monaco.languages.typescript.JsxEmit.ReactJSX,
|
||||||
|
module: monaco.languages.typescript.ModuleKind.ESNext,
|
||||||
|
moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,
|
||||||
|
target: monaco.languages.typescript.ScriptTarget.ESNext,
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user