mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-22 15:22:43 +00:00
Merge pull request #1232 from dank074/patch/eslintConfig
This commit is contained in:
16 files changed
+54
-30
No files matched your search
@@ -46,7 +46,7 @@ export class BaseClassWithoutId extends BaseEntity {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
toJSON(): any {
|
||||
return Object.fromEntries(
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/no-non-null-assertion
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
this.metadata!.columns // @ts-ignore
|
||||
.map((x) => [x.propertyName, this[x.propertyName]])
|
||||
.concat(
|
||||
|
||||
@@ -69,7 +69,6 @@ export interface MessageCreateSchema {
|
||||
}
|
||||
|
||||
// TypeScript complains once this is used above
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
interface PollCreationSchema {
|
||||
question: PollMedia;
|
||||
answers: PollAnswer[];
|
||||
|
||||
@@ -18,4 +18,5 @@
|
||||
|
||||
import { Team } from "@spacebar/util";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
export interface TeamListResponse extends Array<Team> {}
|
||||
@@ -70,7 +70,6 @@ export function enableAutoUpdate(opts: {
|
||||
});
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
async function download(url: string, dir: string) {
|
||||
try {
|
||||
// TODO: use file stream instead of buffer (to prevent crash because of high memory usage for big files)
|
||||
|
||||
@@ -100,6 +100,7 @@ export async function listenEvent(
|
||||
};
|
||||
|
||||
const listener = (msg: ProcessEvent) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||
msg.type === "event" &&
|
||||
msg.id === event &&
|
||||
callback({ ...msg.event, cancel });
|
||||
|
||||
@@ -117,7 +117,7 @@ export const Sentry = {
|
||||
Integrations.setupExpressErrorHandler(app);
|
||||
|
||||
// The typings for this are broken?
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
app.use(function onError(err: any, req: any, res: any, next: any) {
|
||||
res.statusCode = 500;
|
||||
res.end(res.sentry + "\n");
|
||||
|
||||
Reference in new issue
Block a user