Prettier a few files

This commit is contained in:
Rory&
2025-12-17 06:55:55 +01:00
parent 68fa9cc678
commit 877339c8af
7 changed files with 15 additions and 33 deletions

View File

@@ -50,12 +50,12 @@ if (fs.existsSync(path.join(targetDir, "index.js")) || fs.existsSync(path.join(t
process.exit(1);
}
const dirs = fs.readdirSync(targetDir).filter(f => fs.statSync(path.join(targetDir, f)).isDirectory());
const dirs = fs.readdirSync(targetDir).filter((f) => fs.statSync(path.join(targetDir, f)).isDirectory());
for (const dir of dirs) {
content += `export * from "./${dir}";\n`;
}
const files = fs.readdirSync(targetDir).filter(f => f.endsWith(".js") || f.endsWith(".ts"));
const files = fs.readdirSync(targetDir).filter((f) => f.endsWith(".js") || f.endsWith(".ts"));
for (const file of files) {
const filePath = path.join(targetDir, file);
const stat = fs.statSync(filePath);
@@ -66,4 +66,4 @@ for (const file of files) {
}
}
fs.writeFileSync(path.join(targetDir, "index.ts"), content);
fs.writeFileSync(path.join(targetDir, "index.ts"), content);

View File

@@ -34,12 +34,7 @@ const addToDir = (dir) => {
const commentStrings = languageCommentStrings[fileType];
if (!commentStrings) continue;
const preamble =
commentStrings[0] +
"\n" +
SPACEBAR_LICENSE_PREAMBLE +
"\n" +
commentStrings[1];
const preamble = commentStrings[0] + "\n" + SPACEBAR_LICENSE_PREAMBLE + "\n" + commentStrings[1];
if (file.startsWith(preamble)) {
continue;