mirror of
https://github.com/maputnik/editor.git
synced 2026-08-24 05:57:25 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
@@ -182,8 +182,8 @@ export function createEditor(props: {
|
|||||||
return new EditorView({
|
return new EditorView({
|
||||||
doc: props.value,
|
doc: props.value,
|
||||||
extensions: [
|
extensions: [
|
||||||
basicSetup,
|
basicSetup,
|
||||||
json(),
|
json(),
|
||||||
oneDark,
|
oneDark,
|
||||||
new Compartment().of(EditorState.tabSize.of(2)),
|
new Compartment().of(EditorState.tabSize.of(2)),
|
||||||
EditorView.theme({
|
EditorView.theme({
|
||||||
@@ -208,7 +208,7 @@ export function createEditor(props: {
|
|||||||
lintGutter(),
|
lintGutter(),
|
||||||
linter((view: EditorView) => {
|
linter((view: EditorView) => {
|
||||||
const jsonErrors = jsonParseLinter()(view);
|
const jsonErrors = jsonParseLinter()(view);
|
||||||
if (jsonErrors.length > 0) {
|
if (jsonErrors.length > 0) {
|
||||||
return jsonErrors;
|
return jsonErrors;
|
||||||
}
|
}
|
||||||
return specificLinter(view);
|
return specificLinter(view);
|
||||||
@@ -216,4 +216,4 @@ export function createEditor(props: {
|
|||||||
],
|
],
|
||||||
parent: props.parent,
|
parent: props.parent,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user