Linter fixes

pull/1212/head
Zef Hemel 2025-01-16 15:35:56 +01:00
parent 3a6f2271f4
commit 34e50ae74d
3 changed files with 2 additions and 3 deletions

View File

@ -22,7 +22,6 @@ import {
} from "$common/space_lua/runtime.ts"; } from "$common/space_lua/runtime.ts";
import { evalStatement } from "$common/space_lua/eval.ts"; import { evalStatement } from "$common/space_lua/eval.ts";
import { luaBuildStandardEnv } from "$common/space_lua/stdlib.ts";
export async function luaRunCommand( export async function luaRunCommand(
_options: any, _options: any,

View File

@ -27,7 +27,6 @@ import {
type LuaQueryCollection, type LuaQueryCollection,
} from "$common/space_lua/query_collection.ts"; } from "$common/space_lua/query_collection.ts";
import { templateApi } from "$common/space_lua/stdlib/template.ts"; import { templateApi } from "$common/space_lua/stdlib/template.ts";
import { json } from "@codemirror/legacy-modes/X-ZUBjb2RlbWlycm9yL2xhbmd1YWdl/mode/javascript.d.ts";
const printFunction = new LuaBuiltinFunction(async (_sf, ...args) => { const printFunction = new LuaBuiltinFunction(async (_sf, ...args) => {
console.log("[Lua]", ...(await Promise.all(args.map(luaToString)))); console.log("[Lua]", ...(await Promise.all(args.map(luaToString))));
@ -169,6 +168,7 @@ const tagFunction = new LuaBuiltinFunction(
console.error( console.error(
"Failed to JSON serialize variable", "Failed to JSON serialize variable",
v, v,
e,
); );
throw new LuaRuntimeError( throw new LuaRuntimeError(
`Failed to JSON serialize variable ${v} in query`, `Failed to JSON serialize variable ${v} in query`,

View File

@ -33,7 +33,7 @@ export const jsApi = new LuaTable({
return m; return m;
}), }),
each_iterable: new LuaBuiltinFunction((_sf, val) => { each_iterable: new LuaBuiltinFunction((_sf, val) => {
let iterator = val[Symbol.asyncIterator](); const iterator = val[Symbol.asyncIterator]();
return async () => { return async () => {
const result = await iterator.next(); const result = await iterator.next();
if (result.done) { if (result.done) {