fix(lint): resolve biome formatting and unused variables across codebase
This commit is contained in:
1 parent
91008d84fe
commit
0af8d8a398
27 files changed
+117890
-117872
No files matched your search
@@ -7,8 +7,16 @@ const enData = JSON.parse(fs.readFileSync(enPath, "utf8"));
|
||||
|
||||
function deepMerge(target, source) {
|
||||
for (const key of Object.keys(source)) {
|
||||
if (source[key] && typeof source[key] === "object" && !Array.isArray(source[key])) {
|
||||
if (!target[key] || typeof target[key] !== "object" || Array.isArray(target[key])) {
|
||||
if (
|
||||
source[key] &&
|
||||
typeof source[key] === "object" &&
|
||||
!Array.isArray(source[key])
|
||||
) {
|
||||
if (
|
||||
!target[key] ||
|
||||
typeof target[key] !== "object" ||
|
||||
Array.isArray(target[key])
|
||||
) {
|
||||
target[key] = {};
|
||||
}
|
||||
deepMerge(target[key], source[key]);
|
||||
@@ -21,14 +29,16 @@ function deepMerge(target, source) {
|
||||
return target;
|
||||
}
|
||||
|
||||
const files = fs.readdirSync(messagesDir).filter((f) => f.endsWith(".json") && f !== "en.json");
|
||||
const files = fs
|
||||
.readdirSync(messagesDir)
|
||||
.filter((f) => f.endsWith(".json") && f !== "en.json");
|
||||
|
||||
for (const file of files) {
|
||||
const filePath = path.join(messagesDir, file);
|
||||
try {
|
||||
const data = JSON.parse(fs.readFileSync(filePath, "utf8"));
|
||||
deepMerge(data, enData);
|
||||
fs.writeFileSync(filePath, JSON.stringify(data, null, 2) + "\n", "utf8");
|
||||
fs.writeFileSync(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf8");
|
||||
console.log(`Synced ${file}`);
|
||||
} catch (err) {
|
||||
console.error(`Error syncing ${file}:`, err);
|
||||
|
||||
@@ -387,21 +387,21 @@ export function OrganizeImportsDialog({
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent className="flex h-[90vh] max-h-[90vh] w-[800px] max-w-[95vw] flex-col overflow-hidden p-0">
|
||||
<DialogHeader className="flex-none border-b px-4 py-3">
|
||||
<DialogTitle className="flex items-center gap-2 text-sm font-semibold">
|
||||
<FolderTree className="h-4 w-4" />
|
||||
{t("title")}
|
||||
{totalSelected > 0 && !loading && (
|
||||
<Badge variant="secondary" className="text-[10px]">
|
||||
{t("itemsBadge", { count: totalSelected })}
|
||||
</Badge>
|
||||
)}
|
||||
<div className="flex-1 text-[10px] text-muted-foreground ml-2">
|
||||
{moveMode
|
||||
? t("tipMove")
|
||||
: t("tipCreate")}
|
||||
</div>
|
||||
<p className="text-xs text-muted-foreground ml-2">{t("limitHint")}</p>
|
||||
</DialogTitle>
|
||||
<DialogTitle className="flex items-center gap-2 text-sm font-semibold">
|
||||
<FolderTree className="h-4 w-4" />
|
||||
{t("title")}
|
||||
{totalSelected > 0 && !loading && (
|
||||
<Badge variant="secondary" className="text-[10px]">
|
||||
{t("itemsBadge", { count: totalSelected })}
|
||||
</Badge>
|
||||
)}
|
||||
<div className="flex-1 text-[10px] text-muted-foreground ml-2">
|
||||
{moveMode ? t("tipMove") : t("tipCreate")}
|
||||
</div>
|
||||
<p className="text-xs text-muted-foreground ml-2">
|
||||
{t("limitHint")}
|
||||
</p>
|
||||
</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4">
|
||||
@@ -488,7 +488,10 @@ export function OrganizeImportsDialog({
|
||||
type="button"
|
||||
variant={!moveMode ? "default" : "outline"}
|
||||
size="sm"
|
||||
className={cn("h-7 px-3 text-[11px] gap-1.5", !moveMode && "ring-2 ring-primary ring-offset-1")}
|
||||
className={cn(
|
||||
"h-7 px-3 text-[11px] gap-1.5",
|
||||
!moveMode && "ring-2 ring-primary ring-offset-1",
|
||||
)}
|
||||
onClick={() => {
|
||||
setMoveMode(false);
|
||||
setDestinationPageId(null);
|
||||
@@ -502,7 +505,10 @@ export function OrganizeImportsDialog({
|
||||
type="button"
|
||||
variant={moveMode ? "default" : "outline"}
|
||||
size="sm"
|
||||
className={cn("h-7 px-3 text-[11px] gap-1.5", moveMode && "ring-2 ring-primary ring-offset-1")}
|
||||
className={cn(
|
||||
"h-7 px-3 text-[11px] gap-1.5",
|
||||
moveMode && "ring-2 ring-primary ring-offset-1",
|
||||
)}
|
||||
onClick={() => setMoveMode(true)}
|
||||
>
|
||||
<ArrowRight className="h-3.5 w-3.5" />
|
||||
@@ -703,7 +709,9 @@ export function OrganizeImportsDialog({
|
||||
<SelectContent>
|
||||
{CATALOG_LAYOUTS.map((l) => (
|
||||
<SelectItem key={l} value={l} className="text-xs">
|
||||
{l === "default_3x3" ? t("layoutFallbackDefault3x3") : l}
|
||||
{l === "default_3x3"
|
||||
? t("layoutFallbackDefault3x3")
|
||||
: l}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
@@ -969,7 +977,7 @@ export function OrganizeImportsDialog({
|
||||
? thumb.sourcePageCaption.replace(
|
||||
new RegExp(`^${t("impPrefix")}`),
|
||||
"",
|
||||
)
|
||||
)
|
||||
: t("isMoved")}
|
||||
</span>
|
||||
) : (
|
||||
|
||||
@@ -97,7 +97,7 @@ export async function generateScale32(input: Buffer): Promise<{
|
||||
let resolved: ReturnType<typeof resolveNitroFrame>;
|
||||
try {
|
||||
resolved = resolveNitroFrame(json, name);
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
skipped.add(name);
|
||||
continue;
|
||||
}
|
||||
|
||||
+4906
-4906
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4906
-4906
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4906
-4906
File diff suppressed because it is too large.
Load diff
+4912
-4912
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4909
-4909
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
+4911
-4911
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user