chore:little fixes and formating and linting and patches

This commit is contained in:
2026-03-31 15:50:54 +02:00
parent a1ce71ffb6
commit 9b197abcfa
815 changed files with 22960 additions and 8982 deletions

View File

@@ -1,4 +1,4 @@
import { readFile, readdir } from 'node:fs/promises';
import { readdir, readFile } from 'node:fs/promises';
import { join } from 'node:path';
interface FileStructure {
@@ -10,7 +10,7 @@ interface FileStructure {
}
async function analyzeJsonFiles(): Promise<void> {
const dirPath = join(import.meta.dirname || __dirname);
const dirPath = join(import.meta.dirname || import.meta.dirname);
const files = await readdir(dirPath);
const jsonFiles = files.filter((f) => f.endsWith('.json'));
@@ -88,7 +88,7 @@ async function analyzeJsonFiles(): Promise<void> {
console.log(separator);
const sortedGroups = Array.from(groups.entries()).sort(
(a, b) => b[1].length - a[1].length,
(a, b) => b[1].length - a[1].length
);
sortedGroups.forEach(([structureKey, files], index) => {
@@ -117,7 +117,7 @@ async function analyzeJsonFiles(): Promise<void> {
console.log(separator);
const validFiles = structures.filter((s) => s.hasContent && !s.error);
const emptyFiles = structures.filter((s) => !s.hasContent && !s.error);
const emptyFiles = structures.filter((s) => !(s.hasContent || s.error));
const errorFiles = structures.filter((s) => s.error);
console.log(` Total files: ${structures.length}`);
@@ -148,7 +148,9 @@ async function analyzeJsonFiles(): Promise<void> {
console.log(separator);
sortedGroups.forEach(([structureKey, files], index) => {
if (structureKey === 'empty' || structureKey === 'error') return;
if (structureKey === 'empty' || structureKey === 'error') {
return;
}
const groupNum = index + 1;
console.log(`\nGroup ${groupNum} structure:`);