mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
workspace: update eslint rule (#1027)
This commit is contained in:
1 parent
05c3b8f2bd
commit
cee3c00ddb
150 files changed
+1069
-1043
No files matched your search
@@ -91,7 +91,7 @@ function MonacoContainer({
|
||||
if (!editor) return;
|
||||
const current = editor.getValue({ lineEnding: '\n', preserveBOM: false });
|
||||
const diff = diffLines(current, config);
|
||||
const ops: { range: any; text: string }[] = [];
|
||||
const ops: { range: any, text: string }[] = [];
|
||||
let cursor = 1;
|
||||
for (const line of diff) {
|
||||
if (line.added) {
|
||||
@@ -109,11 +109,7 @@ function MonacoContainer({
|
||||
}
|
||||
model.pushEditOperations([], ops, undefined);
|
||||
}, [editor, config]);
|
||||
return (
|
||||
<div ref={initializeEditor} style={{
|
||||
width: '100%', height: '500px',
|
||||
}} />
|
||||
);
|
||||
return <div ref={initializeEditor} style={{ width: '100%', height: '500px' }} />;
|
||||
}
|
||||
|
||||
export default function ConfigEditor({
|
||||
@@ -166,8 +162,12 @@ export default function ConfigEditor({
|
||||
<Allotment onChange={setSize}>
|
||||
<Allotment.Pane>
|
||||
<MonacoContainer
|
||||
editorCallback={registerAction} schema={schema} monaco={monaco}
|
||||
config={stringConfig} setValue={updateFromMonaco} setError={setInfo}
|
||||
editorCallback={registerAction}
|
||||
schema={schema}
|
||||
monaco={monaco}
|
||||
config={stringConfig}
|
||||
setValue={updateFromMonaco}
|
||||
setError={setInfo}
|
||||
size={size[0]}
|
||||
dark={document.documentElement.className.includes('theme--dark')}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user