mirror of
https://github.com/Lapikud/tipilan.git
synced 2026-03-23 21:34:21 +00:00
Fix build errors (mainly eslint)
This commit is contained in:
@@ -946,7 +946,6 @@ export default function Expo() {
|
|||||||
].includes(hoveredRoom)) ||
|
].includes(hoveredRoom)) ||
|
||||||
(currentView === "fuajee" &&
|
(currentView === "fuajee" &&
|
||||||
[
|
[
|
||||||
roomNames.ityk,
|
|
||||||
roomNames.tartuyk,
|
roomNames.tartuyk,
|
||||||
roomNames.estoniagamedev,
|
roomNames.estoniagamedev,
|
||||||
roomNames.info,
|
roomNames.info,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export async function loadRules(
|
|||||||
locale: Locale,
|
locale: Locale,
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
// Try to load the file for the current locale first
|
// Try to load the file for the current locale first
|
||||||
let filePath = path.join(
|
const filePath = path.join(
|
||||||
process.cwd(),
|
process.cwd(),
|
||||||
"src",
|
"src",
|
||||||
"data",
|
"data",
|
||||||
@@ -28,7 +28,7 @@ export async function loadRules(
|
|||||||
// Check if file exists for current locale
|
// Check if file exists for current locale
|
||||||
if (fs.existsSync(filePath)) {
|
if (fs.existsSync(filePath)) {
|
||||||
const file = await import("fs").then(() =>
|
const file = await import("fs").then(() =>
|
||||||
fs.readFileSync(filePath, "utf8")
|
fs.readFileSync(filePath, "utf8"),
|
||||||
);
|
);
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@ export async function loadRules(
|
|||||||
error,
|
error,
|
||||||
);
|
);
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Failed to load rules for ${ruleType}: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
`Failed to load rules for ${ruleType}: ${error instanceof Error ? error.message : "Unknown error"}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,7 +97,7 @@ export async function loadRulesBun(
|
|||||||
error,
|
error,
|
||||||
);
|
);
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Failed to load rules for ${ruleType}: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
`Failed to load rules for ${ruleType}: ${error instanceof Error ? error.message : "Unknown error"}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export async function getRules(
|
|||||||
return fallbackContent;
|
return fallbackContent;
|
||||||
} catch (fallbackError) {
|
} catch (fallbackError) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Rules file not found for ${ruleType} in either ${locale} or et locale`,
|
`Rules file not found for ${ruleType} in either ${locale} or et locale: ${fallbackError}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user