Enable biome based formatter and reformat

This commit is contained in:
Zef Hemel
2026-03-10 09:38:59 +01:00
parent a0b79e7c1d
commit 799e27a9b4
230 changed files with 4145 additions and 4472 deletions
+8 -15
View File
@@ -89,10 +89,7 @@ export async function interpolateLuaString(
const luaResult = singleResult(await evalExpression(parsedExpr, env, sf));
result += await luaToString(luaResult);
} catch (e: any) {
throw new LuaRuntimeError(
`Error evaluating "${expr}": ${e.message}`,
sf,
);
throw new LuaRuntimeError(`Error evaluating "${expr}": ${e.message}`, sf);
}
currentIndex = endIndex + 1;
@@ -109,11 +106,9 @@ export const spaceluaApi = new LuaTable({
* @param luaExpression - The lua expression to parse.
* @returns The parsed expression.
*/
parseExpression: new LuaBuiltinFunction(
(_sf, luaExpression: string) => {
return parseExpressionString(luaExpression);
},
),
parseExpression: new LuaBuiltinFunction((_sf, luaExpression: string) => {
return parseExpressionString(luaExpression);
}),
/**
* Evaluates a parsed lua expression and returns the result.
*
@@ -139,10 +134,8 @@ export const spaceluaApi = new LuaTable({
/**
* Returns your SilverBullet instance's base URL
*/
baseUrl: new LuaBuiltinFunction(
() => {
//NOTE: Removing trailing slash to stay compatible with original code: `location.protocol + "//" + location.host;`
return document.baseURI.replace(/\/*$/, "");
},
),
baseUrl: new LuaBuiltinFunction(() => {
//NOTE: Removing trailing slash to stay compatible with original code: `location.protocol + "//" + location.host;`
return document.baseURI.replace(/\/*$/, "");
}),
});