mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-30 12:34:15 +02:00
Hooked up jsonc language mode for Codemirror
This commit is contained in:
@@ -11,7 +11,7 @@ export function jsonParseLinter() {
|
||||
// We need lint to not break on stuff like {"foo:" ${[ ... ]}} so we'll replace all template
|
||||
// syntax with repeating `1` characters, so it's valid JSON and the position is still correct.
|
||||
const escapedDoc = doc.replace(TEMPLATE_SYNTAX_REGEX, (m) => '1'.repeat(m.length));
|
||||
jsonLintParse(escapedDoc);
|
||||
jsonLintParse(escapedDoc, { mode: 'cjson' });
|
||||
// biome-ignore lint/suspicious/noExplicitAny: none
|
||||
} catch (err: any) {
|
||||
if (!('location' in err)) {
|
||||
|
||||
Reference in New Issue
Block a user