Apply Biome lint fixes
This commit is contained in:
1 parent
f63ca708fe
commit
4eded4ec61
4 files changed
+7
-9
No files matched your search
@@ -97,7 +97,7 @@ async function main(): Promise<void> {
|
|||||||
const dbByClass = new Map(baseRows.map((r) => [r.itemName, r.id]));
|
const dbByClass = new Map(baseRows.map((r) => [r.itemName, r.id]));
|
||||||
const dbById = new Map(baseRows.map((r) => [r.id, r.itemName]));
|
const dbById = new Map(baseRows.map((r) => [r.id, r.itemName]));
|
||||||
let fdWrongId = 0;
|
let fdWrongId = 0;
|
||||||
let fdIdConflict = 0; // id belongs to a different classname in DB
|
let _fdIdConflict = 0; // id belongs to a different classname in DB
|
||||||
let fdMissingInDb = 0;
|
let fdMissingInDb = 0;
|
||||||
const fdExamplesWrong: string[] = [];
|
const fdExamplesWrong: string[] = [];
|
||||||
for (const e of entries) {
|
for (const e of entries) {
|
||||||
@@ -114,7 +114,7 @@ async function main(): Promise<void> {
|
|||||||
);
|
);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (dbById.get(e.id) !== e.classname) fdIdConflict++;
|
if (dbById.get(e.id) !== e.classname) _fdIdConflict++;
|
||||||
}
|
}
|
||||||
console.log(
|
console.log(
|
||||||
` furnidata entries whose id != items_base.id for same classname: ${fdWrongId}`,
|
` furnidata entries whose id != items_base.id for same classname: ${fdWrongId}`,
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ const FILES = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
function env(name) {
|
function env(name) {
|
||||||
return process.env[name] && process.env[name].length
|
return process.env[name]?.length ? process.env[name] : null;
|
||||||
? process.env[name]
|
|
||||||
: null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyOverrides(data) {
|
function applyOverrides(data) {
|
||||||
|
|||||||
@@ -31,21 +31,21 @@ if (parentPort) {
|
|||||||
try {
|
try {
|
||||||
if (msg.type === "convert") {
|
if (msg.type === "convert") {
|
||||||
const result = convertSwfToNitro(msg.buffer, msg.classname);
|
const result = convertSwfToNitro(msg.buffer, msg.classname);
|
||||||
parentPort!.postMessage({
|
parentPort?.postMessage({
|
||||||
id: msg.id,
|
id: msg.id,
|
||||||
ok: true,
|
ok: true,
|
||||||
result,
|
result,
|
||||||
} satisfies WorkerResponse);
|
} satisfies WorkerResponse);
|
||||||
} else {
|
} else {
|
||||||
const icon = extractIconFromSwf(msg.buffer, msg.classname);
|
const icon = extractIconFromSwf(msg.buffer, msg.classname);
|
||||||
parentPort!.postMessage({
|
parentPort?.postMessage({
|
||||||
id: msg.id,
|
id: msg.id,
|
||||||
ok: true,
|
ok: true,
|
||||||
icon: icon ?? null,
|
icon: icon ?? null,
|
||||||
} satisfies WorkerResponse);
|
} satisfies WorkerResponse);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
parentPort!.postMessage({
|
parentPort?.postMessage({
|
||||||
id: msg.id,
|
id: msg.id,
|
||||||
ok: false,
|
ok: false,
|
||||||
error: (err as Error).message,
|
error: (err as Error).message,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import path from "path";
|
import path from "node:path";
|
||||||
|
|
||||||
export function getRuntimePath(...segments: string[]): string {
|
export function getRuntimePath(...segments: string[]): string {
|
||||||
const resolvePath = new Function("p", "segs", "return p.join(...segs)");
|
const resolvePath = new Function("p", "segs", "return p.join(...segs)");
|
||||||
|
|||||||
Reference in new issue
Block a user