From c36dbaa38c3e47d338aa900df528f96954e05b6a Mon Sep 17 00:00:00 2001 From: rahul Date: Tue, 13 Feb 2024 13:55:21 +0530 Subject: [PATCH] feat: monaco fine tuned --- packages/web/src/components/Playground.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/web/src/components/Playground.tsx b/packages/web/src/components/Playground.tsx index 27a3fe77..90da4f84 100644 --- a/packages/web/src/components/Playground.tsx +++ b/packages/web/src/components/Playground.tsx @@ -51,13 +51,8 @@ export default function Playground(props: PlaygroundProps): JSX.Element { // Compile all schemas to Ajv instance const ajv = new Ajv({ schemas: Object.values(schemas), - strict: false, allErrors: true, - verbose: true, - messages: true, - code: { - source: true, - }, + strict: false, }); // State to hold editor input @@ -84,7 +79,7 @@ export default function Playground(props: PlaygroundProps): JSX.Element { const validate = ajv.getSchema(props.schema.id); if (!validate) return showError("Unable to validate schema"); const sourceMap = getParsedEditorInput(); - const isValid = validate(sourceMap.data); + validate(sourceMap.data); showValidationErrors(validate.errors, sourceMap); } @@ -172,6 +167,11 @@ export default function Playground(props: PlaygroundProps): JSX.Element { defaultValue={JSON.stringify(exampleSchema, undefined, TAB_WIDTH)} onChange={handleEditorChange} onMount={handleEditorDidMount} + options={{ + contextmenu: false, + autoIndent: "advanced", + tabSize: TAB_WIDTH, + }} /> );