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

@@ -5,4 +5,7 @@ node_modules
.vscode
hashes.json
flake.lock
extra/admin-api
extra/admin-api
discord-response-samples
src/util/migration/postgres-initial.ts
scripts/stagingMigrat

View File

@@ -9,5 +9,5 @@
"useTabs": true,
"singleQuote": false,
"endOfLine": "auto",
"printWidth": 180
"printWidth": 180
}

View File

@@ -16,20 +16,9 @@ const compat = new FlatCompat({
export default [
{
ignores: [
"**/node_modules",
"**/dist",
"**/README.md",
"**/COPYING",
"**/scripts/",
"**/assets",
"**/extra/",
],
ignores: ["**/node_modules", "**/dist", "**/README.md", "**/COPYING", "**/scripts/", "**/assets", "**/extra/"],
},
...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
),
...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
{
plugins: {
"@typescript-eslint": typescriptEslint,

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;

View File

@@ -1,4 +1,3 @@
// @prettier-ignore
/*
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
Copyright (C) 2025 Spacebar and Spacebar Contributors

View File

@@ -13,9 +13,7 @@
/* Language and Environment */
"target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
"lib": [
"ESNext"
] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
"lib": ["ESNext"] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
// "jsx": "preserve", /* Specify what JSX code is generated. */
"experimentalDecorators": true /* Enable experimental support for TC39 stage 2 draft decorators. */,
"emitDecoratorMetadata": true /* Emit design-type metadata for decorated declarations in source files. */,
@@ -33,20 +31,18 @@
"moduleResolution": "nodenext" /* Specify how TypeScript looks up a file from a given module specifier. */,
// "baseUrl": "./src/", //deprecated
"paths": {
//"*": ["./src/*"],
//"*": ["./src/*"],
"@spacebar/api*": ["./src/api"],
"@spacebar/gateway*": ["./src/gateway"],
"@spacebar/cdn*": ["./src/cdn"],
"@spacebar/util*": ["./src/util"],
"@spacebar/webrtc*": ["./src/webrtc"],
"@spacebar/schemas*": ["./src/schemas"],
"lambert-server*": ["./src/util/util/lambert-server"]
"lambert-server*": ["./src/util/util/lambert-server"]
} /* Specify a set of entries that re-map imports to additional lookup locations. */,
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
"types": [
"node"
] /* Specify type package names to be included without being referenced in a source file. */,
"types": ["node"] /* Specify type package names to be included without being referenced in a source file. */,
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
"resolveJsonModule": true /* Enable importing .json files. */,