function configureMonaco(monaco) {
  const compilerDefaults = {
    jsxFactory: 'React.createElement',
    reactNamespace: 'React',
    jsx: monaco.languages.typescript.JsxEmit.React,
    target: monaco.languages.typescript.ScriptTarget.ES2016,
    allowNonTsExtensions: true,
    moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,
    experimentalDecorators: true,
    noEmit: true,
    allowJs: true,
    typeRoots: ['node_modules/@types']
  };
  monaco.languages.typescript.javascriptDefaults.setCompilerOptions({ noLib: true, allowNonTsExtensions: true });

  monaco.languages.typescript.typescriptDefaults.setMaximumWorkerIdleTime(-1);
  monaco.languages.typescript.javascriptDefaults.setMaximumWorkerIdleTime(-1);
  monaco.languages.typescript.typescriptDefaults.setCompilerOptions(
    compilerDefaults
  );
  monaco.languages.typescript.javascriptDefaults.setCompilerOptions(
    compilerDefaults
  );

  monaco.languages.typescript.typescriptDefaults.setEagerModelSync(true);
  monaco.languages.typescript.javascriptDefaults.setEagerModelSync(true);

  monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({
    noSemanticValidation: true,
    noSyntaxValidation: true
  });
  monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
    noSemanticValidation: true,
    noSyntaxValidation: true
  });

  // monaco.languages.typescript.typescriptDefaults.addExtraLib(content, "")

  plugin.getPlugins('editor.configMonaco').forEach(p => p.editor.configMonaco(monaco));
}
// Config Monaco Editor to support JSX and ESLint
Config Monaco Editor to support JSX and ESLint
Config Monaco Editor to support JSX and ESLint
function configureMonaco(monaco) {
  const compilerDefaults = {
    jsxFactory: 'React.createElement',
    reactNamespace: 'React',
    jsx: monaco.languages.typescript.JsxEmit.React,
    target: monaco.languages.typescript.ScriptTarget.ES2016,
    allowNonTsExtensions: true,
    moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,
    experimentalDecorators: true,
    noEmit: true,
    allowJs: true,
    typeRoots: ['node_modules/@types']
  };
  monaco.languages.typescript.javascriptDefaults.setCompilerOptions({ noLib: true, allowNonTsExtensions: true });
  monaco.languages.typescript.typescriptDefaults.setMaximumWorkerIdleTime(-1);
  monaco.languages.typescript.javascriptDefaults.setMaximumWorkerIdleTime(-1);
  monaco.languages.typescript.typescriptDefaults.setCompilerOptions(
    compilerDefaults
  );
  monaco.languages.typescript.javascriptDefaults.setCompilerOptions(
    compilerDefaults
  );
  monaco.languages.typescript.typescriptDefaults.setEagerModelSync(true);
  monaco.languages.typescript.javascriptDefaults.setEagerModelSync(true);
  monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({
    noSemanticValidation: true,
    noSyntaxValidation: true
  });
  monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
    noSemanticValidation: true,
    noSyntaxValidation: true
  });
  plugin.getPlugins('editor.configMonaco').forEach(p => p.editor.configMonaco(monaco));
}
function configureMonaco ( monaco ) { const compilerDefaults = { jsxFactory : 'React.createElement' , reactNamespace : 'React' , jsx : monaco . languages . typescript . JsxEmit . React , target : monaco . languages . typescript . ScriptTarget . ES2016 , allowNonTsExtensions : true , moduleResolution : monaco . languages . typescript . ModuleResolutionKind . NodeJs , experimentalDecorators : true , noEmit : true , allowJs : true , typeRoots : [ 'node_modules/@types' ] } ; monaco . languages . typescript . javascriptDefaults . setCompilerOptions ( { noLib : true , allowNonTsExtensions : true } ) ; monaco . languages . typescript . typescriptDefaults . setMaximumWorkerIdleTime ( - 1 ) ; monaco . languages . typescript . javascriptDefaults . setMaximumWorkerIdleTime ( - 1 ) ; monaco . languages . typescript . typescriptDefaults . setCompilerOptions ( compilerDefaults ) ; monaco . languages . typescript . javascriptDefaults . setCompilerOptions ( compilerDefaults ) ; monaco . languages . typescript . typescriptDefaults . setEagerModelSync ( true ) ; monaco . languages . typescript . javascriptDefaults . setEagerModelSync ( true ) ; monaco . languages . typescript . typescriptDefaults . setDiagnosticsOptions ( { noSemanticValidation : true , noSyntaxValidation : true } ) ; monaco . languages . typescript . javascriptDefaults . setDiagnosticsOptions ( { noSemanticValidation : true , noSyntaxValidation : true } ) ; plugin . getPlugins ( 'editor.configMonaco' ) . forEach ( p => p . editor . configMonaco ( monaco ) ) ; }
Config Monaco Editor to support JSX and ESLint
Config Monaco Editor to support JSX and ESLint
// monaco.languages.typescript.typescriptDefaults.addExtraLib(content, "")