فهرست منبع

ignore: update json schema for better lsp dx (#2186)

Aiden Cline 6 ماه پیش
والد
کامیت
004f53f741
1فایلهای تغییر یافته به همراه9 افزوده شده و 1 حذف شده
  1. 9 1
      packages/opencode/script/schema.ts

+ 9 - 1
packages/opencode/script/schema.ts

@@ -32,5 +32,13 @@ const result = zodToJsonSchema(Config.Info, {
 
     return jsonSchema
   },
-})
+}) as Record<string, unknown> & {
+  allowComments?: boolean
+  allowTrailingCommas?: boolean
+}
+
+// used for json lsps since config supports jsonc
+result.allowComments = true
+result.allowTrailingCommas = true
+
 await Bun.write(file, JSON.stringify(result, null, 2))