fix(style): editor code lint
This commit is contained in:
@@ -122,7 +122,15 @@ const ViewCodeModal: React.FC<ViewModalProps> = (props) => {
|
|||||||
const handleEditorDidMount = (editor: any, monaco: any) => {
|
const handleEditorDidMount = (editor: any, monaco: any) => {
|
||||||
editorRef.current = editor;
|
editorRef.current = editor;
|
||||||
setLoaded(true);
|
setLoaded(true);
|
||||||
console.log('loaded====');
|
console.log('loaded====', editor, monaco);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleBeforeMount = (monaco: any) => {
|
||||||
|
monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
|
||||||
|
noSemanticValidation: false,
|
||||||
|
noSyntaxValidation: false,
|
||||||
|
diagnosticCodesToIgnore: [80001]
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleOnChangeLang = (value: string) => {
|
const handleOnChangeLang = (value: string) => {
|
||||||
@@ -186,6 +194,25 @@ const ViewCodeModal: React.FC<ViewModalProps> = (props) => {
|
|||||||
language={lang}
|
language={lang}
|
||||||
value={codeValue}
|
value={codeValue}
|
||||||
options={editorConfig}
|
options={editorConfig}
|
||||||
|
overrideServices={{
|
||||||
|
quickSuggestions: {
|
||||||
|
other: false,
|
||||||
|
comments: false,
|
||||||
|
strings: false
|
||||||
|
},
|
||||||
|
disableLayerHinting: true,
|
||||||
|
languages: {
|
||||||
|
typescript: {
|
||||||
|
moduleKind: '2',
|
||||||
|
diagnosticsOptions: {
|
||||||
|
noSemanticValidation: false,
|
||||||
|
noSyntaxValidation: false,
|
||||||
|
diagnosticCodesToIgnore: [80001]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
beforeMount={handleBeforeMount}
|
||||||
onMount={handleEditorDidMount}
|
onMount={handleEditorDidMount}
|
||||||
/>
|
/>
|
||||||
</EditorWrap>
|
</EditorWrap>
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
.collapse-btn {
|
.collapse-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: -7px;
|
||||||
left: 0;
|
left: -5px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
&.collapse {
|
&.collapse {
|
||||||
width: 33px;
|
width: 33px;
|
||||||
padding-left: 32px;
|
padding-left: 32px;
|
||||||
overflow: hidden;
|
// overflow: hidden;
|
||||||
transition: width 0.3s ease;
|
transition: width 0.3s ease;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user