summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-17 06:55:55 +0100
committerRory& <root@rory.gay>2025-12-17 06:55:55 +0100
commit877339c8af23baa9be6b5de4b74b7b2f517618d8 (patch)
tree101fccedc67bc5af35791ce957e657c17a4a2310
parentDrop staging migration scripts - these are years old now... (diff)
downloadserver-ts-877339c8af23baa9be6b5de4b74b7b2f517618d8.tar.xz
Prettier a few files
-rw-r--r--.prettierignore5
-rw-r--r--.prettierrc.json2
-rw-r--r--eslint.config.mjs15
-rw-r--r--scripts/genIndex.js6
-rw-r--r--scripts/license.js7
-rw-r--r--src/util/migration/postgres-initial.ts1
-rw-r--r--tsconfig.json12
7 files changed, 15 insertions, 33 deletions
diff --git a/.prettierignore b/.prettierignore

index a1e4b5b1..185e5af0 100644 --- a/.prettierignore +++ b/.prettierignore
@@ -5,4 +5,7 @@ node_modules .vscode hashes.json flake.lock -extra/admin-api \ No newline at end of file +extra/admin-api +discord-response-samples +src/util/migration/postgres-initial.ts +scripts/stagingMigrat \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json
index cbb8af09..a9a4a231 100644 --- a/.prettierrc.json +++ b/.prettierrc.json
@@ -9,5 +9,5 @@ "useTabs": true, "singleQuote": false, "endOfLine": "auto", - "printWidth": 180 + "printWidth": 180 } diff --git a/eslint.config.mjs b/eslint.config.mjs
index 134c5c07..d0c06583 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs
@@ -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, diff --git a/scripts/genIndex.js b/scripts/genIndex.js
index 701a7566..c1b68227 100644 --- a/scripts/genIndex.js +++ b/scripts/genIndex.js
@@ -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); \ No newline at end of file +fs.writeFileSync(path.join(targetDir, "index.ts"), content); diff --git a/scripts/license.js b/scripts/license.js
index b12080dd..380a3ed6 100644 --- a/scripts/license.js +++ b/scripts/license.js
@@ -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; diff --git a/src/util/migration/postgres-initial.ts b/src/util/migration/postgres-initial.ts
index 76979417..20a747c2 100644 --- a/src/util/migration/postgres-initial.ts +++ b/src/util/migration/postgres-initial.ts
@@ -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 diff --git a/tsconfig.json b/tsconfig.json
index 61c415cc..374aedfe 100644 --- a/tsconfig.json +++ b/tsconfig.json
@@ -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. */,