diff --git a/biome.json b/biome.json index 9d22bb10..fcc34c21 100644 --- a/biome.json +++ b/biome.json @@ -45,6 +45,7 @@ "!**/website_build", "!**/test-results", "!**/.chrome-data", + "!target", "!**/*.html", "!**/*.plug.js", "!plugs/*/assets", diff --git a/client/space_lua/pretty_print.ts b/client/space_lua/pretty_print.ts index fc6f0d29..04d80944 100644 --- a/client/space_lua/pretty_print.ts +++ b/client/space_lua/pretty_print.ts @@ -158,9 +158,11 @@ class Printer { case "TableConstructor": return this.tableConstructor(e.fields, depth); case "FunctionDefinition": - return ( - "function" + this.functionRest(e.body.parameters, e.body.block, depth) - ); + return `function${this.functionRest( + e.body.parameters, + e.body.block, + depth, + )}`; case "FunctionCall": return this.functionCall(e, depth); case "Query": { diff --git a/client/space_lua/stdlib/js.ts b/client/space_lua/stdlib/js.ts index 530a5842..881e0be9 100644 --- a/client/space_lua/stdlib/js.ts +++ b/client/space_lua/stdlib/js.ts @@ -70,7 +70,7 @@ export const jsApi = new LuaTable({ callback: async (_sf, path: string) => { const base = document.baseURI.replace(/\/*$/, "/"); const rel = String(path).replace(/^\/+/, ""); - let m = await import(base + fsEndpoint.slice(1) + "/" + rel); + let m = await import(`${base}${fsEndpoint.slice(1)}/${rel}`); // Unwrap default if it exists (same contract as `js.import`). if (Object.keys(m).length === 1 && m.default) { m = m.default;