mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-30 07:30:00 +00:00
Prettier a few files
This commit is contained in:
@@ -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
|
||||
@@ -9,5 +9,5 @@
|
||||
"useTabs": true,
|
||||
"singleQuote": false,
|
||||
"endOfLine": "auto",
|
||||
"printWidth": 180
|
||||
"printWidth": 180
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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. */,
|
||||
|
||||
Reference in New Issue
Block a user