Skip to content

Commit

Permalink
lint json in environment manager
Browse files Browse the repository at this point in the history
  • Loading branch information
imolorhe committed Dec 6, 2023
1 parent 951a1b2 commit 4becc91
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ import {
EnvironmentState,
} from 'altair-graphql-core/build/types/state/environments.interfaces';
import { Extension } from '@codemirror/state';
import { json } from '@codemirror/lang-json';
import { json, jsonParseLinter } from '@codemirror/lang-json';
import { Options as SortableOptions, SortableEvent } from 'sortablejs';
import { TODO } from 'altair-graphql-core/build/types/shared';
import { linter } from '@codemirror/lint';
(window as any).jsonlint = (window as any).jsonlint || {
parser: <TODO>{
parse: function (str: string) {
Expand Down Expand Up @@ -57,10 +58,7 @@ export class EnvironmentManagerComponent implements OnInit, OnChanges {

@ViewChild('subEnvironmentTitle') subEnvironmentTitleEl?: ElementRef;

editorExtensions: Extension[] = [
json(),
// jsonParseLinter,
];
editorExtensions: Extension[] = [json(), linter(jsonParseLinter())];

selectedEnvironmentId = 'base';
selectedEnvironment?: EnvironmentState;
Expand Down

0 comments on commit 4becc91

Please sign in to comment.