Skip to content

Commit e068980

Browse files
committed
fix(files): stop validating .jsonl as single-document JSON
1 parent af1aaa8 commit e068980

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • apps/sim/app/workspace/[workspaceId]/files/components/file-viewer

apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/text-editor.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,12 @@ const MONACO_LANGUAGE_BY_EXTENSION: Partial<Record<string, string>> = {
264264
graphql: 'graphql',
265265
gql: 'graphql',
266266
json: 'json',
267-
jsonl: 'json',
267+
/**
268+
* Not `json`: JSON Lines holds one value per line, which Monaco's
269+
* single-document parser flags as invalid. Validation is global
270+
* (`jsonDefaults`), so opting JSONL out is the only per-file lever.
271+
*/
272+
jsonl: 'plaintext',
268273
yaml: 'yaml',
269274
yml: 'yaml',
270275
toml: 'toml',

0 commit comments

Comments
 (0)