mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor: 🚨 Turn every linter rule on and fix issues (there were a LOT :3)
This commit is contained in:
parent
2e98859153
commit
a1e02d0d78
177 changed files with 1826 additions and 1248 deletions
|
|
@ -2,7 +2,7 @@ import { consoleLogger } from "@/loggers";
|
|||
import { Command } from "@oclif/core";
|
||||
import { setupDatabase } from "~/drizzle/db";
|
||||
|
||||
export abstract class BaseCommand<T extends typeof Command> extends Command {
|
||||
export abstract class BaseCommand<_T extends typeof Command> extends Command {
|
||||
protected async init(): Promise<void> {
|
||||
await super.init();
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { Args } from "@oclif/core";
|
|||
import chalk from "chalk";
|
||||
import ora from "ora";
|
||||
import { BaseCommand } from "~/cli/base";
|
||||
import { getUrl } from "~/database/entities/Attachment";
|
||||
import { getUrl } from "~/database/entities/attachment";
|
||||
import { db } from "~/drizzle/db";
|
||||
import { Emojis } from "~/drizzle/schema";
|
||||
import { config } from "~/packages/config-manager";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { lookup } from "mime-types";
|
|||
import ora from "ora";
|
||||
import { unzip } from "unzipit";
|
||||
import { BaseCommand } from "~/cli/base";
|
||||
import { getUrl } from "~/database/entities/Attachment";
|
||||
import { getUrl } from "~/database/entities/attachment";
|
||||
import { db } from "~/drizzle/db";
|
||||
import { Emojis } from "~/drizzle/schema";
|
||||
import { config } from "~/packages/config-manager";
|
||||
|
|
|
|||
|
|
@ -33,14 +33,14 @@ export default class Start extends BaseCommand<typeof Start> {
|
|||
public async run(): Promise<void> {
|
||||
const { flags } = await this.parse(Start);
|
||||
|
||||
const numCPUs = flags["all-threads"] ? os.cpus().length : flags.threads;
|
||||
const numCpUs = flags["all-threads"] ? os.cpus().length : flags.threads;
|
||||
|
||||
// Check if index is a JS or TS file (depending on the environment)
|
||||
const index = (await Bun.file("index.ts").exists())
|
||||
? "index.ts"
|
||||
: "index.js";
|
||||
|
||||
for (let i = 0; i < numCPUs; i++) {
|
||||
for (let i = 0; i < numCpUs; i++) {
|
||||
const args = ["bun", index];
|
||||
if (i !== 0 || flags.silent) {
|
||||
args.push("--silent");
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ export default class UserCreate extends BaseCommand<typeof UserCreate> {
|
|||
),
|
||||
);
|
||||
|
||||
if (!flags.format && !flags["set-password"]) {
|
||||
if (!(flags.format || flags["set-password"])) {
|
||||
const link = "";
|
||||
|
||||
this.log(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue