fix: resolve biome linter warnings and code formatting
This commit is contained in:
1 parent
416c31643b
commit
a5044c80d7
1 file changed
+14
-4
@@ -17,10 +17,16 @@ const fs = require("node:fs");
|
||||
const path = require("node:path");
|
||||
const { parse, modify } = require("jsonc-parser");
|
||||
|
||||
const FILES = ["renderer-config.json", "renderer-config.jsonc", "ui-config.json"];
|
||||
const FILES = [
|
||||
"renderer-config.json",
|
||||
"renderer-config.jsonc",
|
||||
"ui-config.json",
|
||||
];
|
||||
|
||||
function env(name) {
|
||||
return process.env[name] && process.env[name].length ? process.env[name] : null;
|
||||
return process.env[name] && process.env[name].length
|
||||
? process.env[name]
|
||||
: null;
|
||||
}
|
||||
|
||||
function applyOverrides(data) {
|
||||
@@ -47,7 +53,8 @@ function applyOverrides(data) {
|
||||
|
||||
if (gamedata) {
|
||||
data["radio.url"] = `${gamedata}/config/radio-stations.jsonc?t=%timestamp%`;
|
||||
data["soundboard.url"] = `${gamedata}/config/soundboard-sounds.jsonc?t=%timestamp%`;
|
||||
data["soundboard.url"] =
|
||||
`${gamedata}/config/soundboard-sounds.jsonc?t=%timestamp%`;
|
||||
}
|
||||
if ("show.google.ads" in data) data["show.google.ads"] = false;
|
||||
return data;
|
||||
@@ -73,7 +80,10 @@ for (const dir of dirs) {
|
||||
}
|
||||
let data;
|
||||
try {
|
||||
data = parse(content, [], { allowTrailingComma: true, allowEmptyContent: true });
|
||||
data = parse(content, [], {
|
||||
allowTrailingComma: true,
|
||||
allowEmptyContent: true,
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(`[sync-nitro-urls] parse error in ${full}: ${e}`);
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user