no more eslint

This commit is contained in:
ThatOneCalculator 2023-01-12 20:54:33 -08:00
parent 6b00abf05c
commit 7c2dabd047
No known key found for this signature in database
GPG key ID: 8703CACD01000000
393 changed files with 439 additions and 1269 deletions

View file

@ -1,4 +1,4 @@
{ {
"eslint.packageManager": "pnpm", "eslint.packageManager": "pnpm",
"workspace.workspaceFolderCheckCwd": false, "workspace.workspaceFolderCheckCwd": false
} }

View file

@ -3,7 +3,8 @@ pipeline:
image: node:latest image: node:latest
commands: commands:
- cp .config/ci.yml .config/default.yml - cp .config/ci.yml .config/default.yml
- npm i -g pnpm - corepack enable
- corepack prepare pnpm@latest --activate
- pnpm i --frozen-lockfile - pnpm i --frozen-lockfile
- pnpm run build - pnpm run build
- pnpm run migrate - pnpm run migrate

View file

@ -10,7 +10,8 @@ RUN apk update
RUN apk add git ffmpeg tini alpine-sdk python3 RUN apk add git ffmpeg tini alpine-sdk python3
# Configure corepack and pnpm # Configure corepack and pnpm
RUN npm i -g pnpm RUN corepack enable
RUN corepack prepare pnpm@latest --activate
RUN pnpm i --frozen-lockfile RUN pnpm i --frozen-lockfile
ARG NODE_ENV=production ARG NODE_ENV=production

View file

@ -101,7 +101,8 @@ cd calckey/
```sh ```sh
# nvm install 19 && nvm use 19 # nvm install 19 && nvm use 19
npm i -g pnpm corepack enable
corepack prepare pnpm@latest --activate
pnpm i pnpm i
``` ```

View file

@ -15,7 +15,6 @@
/** /**
* @type {Cypress.PluginConfig} * @type {Cypress.PluginConfig}
*/ */
// eslint-disable-next-line no-unused-vars
module.exports = (on, config) => { module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits // `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config // `config` is the resolved Cypress config

View file

@ -40,7 +40,6 @@
"@bull-board/ui": "^4.10.2", "@bull-board/ui": "^4.10.2",
"@tensorflow/tfjs": "^3.21.0", "@tensorflow/tfjs": "^3.21.0",
"calckey-js": "^0.0.20", "calckey-js": "^0.0.20",
"eslint": "^8.31.0",
"execa": "5.1.1", "execa": "5.1.1",
"gulp": "4.0.2", "gulp": "4.0.2",
"gulp-cssnano": "2.1.3", "gulp-cssnano": "2.1.3",
@ -55,13 +54,11 @@
"devDependencies": { "devDependencies": {
"@types/gulp": "4.0.10", "@types/gulp": "4.0.10",
"@types/gulp-rename": "2.0.1", "@types/gulp-rename": "2.0.1",
"@typescript-eslint/parser": "5.46.1",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"cypress": "10.11.0", "cypress": "10.11.0",
"install-peers": "^1.0.4", "install-peers": "^1.0.4",
"rome": "^11.0.0", "rome": "^11.0.0",
"start-server-and-test": "1.15.2", "start-server-and-test": "1.15.2",
"typescript": "4.9.4", "typescript": "4.9.4"
"vue-eslint-parser": "^9.1.0"
} }
} }

View file

@ -10,7 +10,7 @@
"revertmigration": "typeorm migration:revert -d ormconfig.js", "revertmigration": "typeorm migration:revert -d ormconfig.js",
"build": "pnpm swc src -d built -D", "build": "pnpm swc src -d built -D",
"watch": "pnpm swc src -d built -D -w", "watch": "pnpm swc src -d built -D -w",
"lint": "pnpm eslint --quiet \"src/**/*.ts\"", "lint": "pnpm rome check \"src/**/*.ts\"",
"mocha": "cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha", "mocha": "cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha",
"test": "pnpm run mocha" "test": "pnpm run mocha"
}, },
@ -178,11 +178,7 @@
"@types/web-push": "3.3.2", "@types/web-push": "3.3.2",
"@types/websocket": "1.0.5", "@types/websocket": "1.0.5",
"@types/ws": "8.5.3", "@types/ws": "8.5.3",
"@typescript-eslint/eslint-plugin": "5.46.1",
"@typescript-eslint/parser": "5.46.1",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"eslint": "8.31.0",
"eslint-plugin-import": "2.26.0",
"execa": "6.1.0", "execa": "6.1.0",
"swc-loader": "^0.2.3", "swc-loader": "^0.2.3",
"typescript": "4.9.4", "typescript": "4.9.4",

View file

@ -66,7 +66,6 @@ export function genIdenticon(seed: string, stream: WriteStream): Promise<void> {
// 1*n (filled by false) // 1*n (filled by false)
const center: boolean[] = new Array(n).fill(false); const center: boolean[] = new Array(n).fill(false);
// eslint:disable-next-line:prefer-for-of
for (let x = 0; x < side.length; x++) { for (let x = 0; x < side.length; x++) {
for (let y = 0; y < side[x].length; y++) { for (let y = 0; y < side[x].length; y++) {
side[x][y] = rand(3) === 0; side[x][y] = rand(3) === 0;

View file

@ -300,14 +300,12 @@ async function* asyncIterateFrames(
}); });
command.run(); command.run();
for (let i = 1; true; i++) { for (let i = 1; true; i++) {
// eslint-disable-line @typescript-eslint/no-unnecessary-condition
const current = `${i}.png`; const current = `${i}.png`;
const next = `${i + 1}.png`; const next = `${i + 1}.png`;
const framePath = join(cwd, current); const framePath = join(cwd, current);
if (await exists(join(cwd, next))) { if (await exists(join(cwd, next))) {
yield framePath; yield framePath;
} else if (!finished) { } else if (!finished) {
// eslint-disable-line @typescript-eslint/no-unnecessary-condition
watcher.add(next); watcher.add(next);
await new Promise<void>((resolve, reject) => { await new Promise<void>((resolve, reject) => {
watcher.on("add", function onAdd(path) { watcher.on("add", function onAdd(path) {

View file

@ -104,7 +104,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const query = makePaginationQuery( const query = makePaginationQuery(
AbuseUserReports.createQueryBuilder("report"), AbuseUserReports.createQueryBuilder("report"),

View file

@ -30,7 +30,7 @@ export const paramDef = {
required: ["username", "password"], required: ["username", "password"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, _me) => { export default define(meta, paramDef, async (ps, _me) => {
const me = _me ? await Users.findOneByOrFail({ id: _me.id }) : null; const me = _me ? await Users.findOneByOrFail({ id: _me.id }) : null;
const noUsers = const noUsers =

View file

@ -19,7 +19,7 @@ export const paramDef = {
required: ["userId"], required: ["userId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy({ id: ps.userId }); const user = await Users.findOneBy({ id: ps.userId });

View file

@ -17,7 +17,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const hostedConfig = config.isManagedHosting; const hostedConfig = config.isManagedHosting;
const hosted = hostedConfig != null && hostedConfig === true; const hosted = hostedConfig != null && hostedConfig === true;

View file

@ -31,7 +31,7 @@ export const paramDef = {
], ],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
await Ads.insert({ await Ads.insert({
id: genId(), id: genId(),

View file

@ -25,7 +25,7 @@ export const paramDef = {
required: ["id"], required: ["id"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const ad = await Ads.findOneBy({ id: ps.id }); const ad = await Ads.findOneBy({ id: ps.id });

View file

@ -19,7 +19,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const query = makePaginationQuery( const query = makePaginationQuery(
Ads.createQueryBuilder("ad"), Ads.createQueryBuilder("ad"),

View file

@ -41,7 +41,7 @@ export const paramDef = {
], ],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const ad = await Ads.findOneBy({ id: ps.id }); const ad = await Ads.findOneBy({ id: ps.id });

View file

@ -61,7 +61,7 @@ export const paramDef = {
required: ["title", "text", "imageUrl"], required: ["title", "text", "imageUrl"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const announcement = await Announcements.insert({ const announcement = await Announcements.insert({
id: genId(), id: genId(),

View file

@ -25,7 +25,7 @@ export const paramDef = {
required: ["id"], required: ["id"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const announcement = await Announcements.findOneBy({ id: ps.id }); const announcement = await Announcements.findOneBy({ id: ps.id });

View file

@ -72,7 +72,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const query = makePaginationQuery( const query = makePaginationQuery(
Announcements.createQueryBuilder("announcement"), Announcements.createQueryBuilder("announcement"),

View file

@ -28,7 +28,7 @@ export const paramDef = {
required: ["id", "title", "text", "imageUrl"], required: ["id", "title", "text", "imageUrl"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const announcement = await Announcements.findOneBy({ id: ps.id }); const announcement = await Announcements.findOneBy({ id: ps.id });

View file

@ -19,7 +19,7 @@ export const paramDef = {
required: ["userId"], required: ["userId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const user = await Users.findOneByOrFail({ id: ps.userId }); const user = await Users.findOneByOrFail({ id: ps.userId });
if (user.isDeleted) { if (user.isDeleted) {

View file

@ -17,7 +17,7 @@ export const paramDef = {
required: ["userId"], required: ["userId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const files = await DriveFiles.findBy({ const files = await DriveFiles.findBy({
userId: ps.userId, userId: ps.userId,

View file

@ -18,7 +18,7 @@ export const paramDef = {
required: ["userId", "overrideMb"], required: ["userId", "overrideMb"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy({ id: ps.userId }); const user = await Users.findOneBy({ id: ps.userId });

View file

@ -14,7 +14,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
createCleanRemoteFilesJob(); createCleanRemoteFilesJob();
}); });

View file

@ -16,7 +16,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const files = await DriveFiles.findBy({ const files = await DriveFiles.findBy({
userId: IsNull(), userId: IsNull(),

View file

@ -48,7 +48,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const query = makePaginationQuery( const query = makePaginationQuery(
DriveFiles.createQueryBuilder("file"), DriveFiles.createQueryBuilder("file"),

View file

@ -195,7 +195,7 @@ export const paramDef = {
], ],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const file = ps.fileId const file = ps.fileId
? await DriveFiles.findOneBy({ id: ps.fileId }) ? await DriveFiles.findOneBy({ id: ps.fileId })

View file

@ -31,7 +31,7 @@ export const paramDef = {
required: ["ids", "aliases"], required: ["ids", "aliases"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const emojis = await Emojis.findBy({ const emojis = await Emojis.findBy({
id: In(ps.ids), id: In(ps.ids),

View file

@ -30,7 +30,7 @@ export const paramDef = {
required: ["fileId"], required: ["fileId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const file = await DriveFiles.findOneBy({ id: ps.fileId }); const file = await DriveFiles.findOneBy({ id: ps.fileId });

View file

@ -44,7 +44,7 @@ export const paramDef = {
required: ["emojiId"], required: ["emojiId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const emoji = await Emojis.findOneBy({ id: ps.emojiId }); const emoji = await Emojis.findOneBy({ id: ps.emojiId });

View file

@ -26,7 +26,7 @@ export const paramDef = {
required: ["ids"], required: ["ids"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const emojis = await Emojis.findBy({ const emojis = await Emojis.findBy({
id: In(ps.ids), id: In(ps.ids),

View file

@ -27,7 +27,7 @@ export const paramDef = {
required: ["id"], required: ["id"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const emoji = await Emojis.findOneBy({ id: ps.id }); const emoji = await Emojis.findOneBy({ id: ps.id });

View file

@ -16,7 +16,7 @@ export const paramDef = {
required: ["fileId"], required: ["fileId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
createImportCustomEmojisJob(user, ps.fileId); createImportCustomEmojisJob(user, ps.fileId);
}); });

View file

@ -77,7 +77,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const q = makePaginationQuery( const q = makePaginationQuery(
Emojis.createQueryBuilder("emoji"), Emojis.createQueryBuilder("emoji"),

View file

@ -71,7 +71,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const q = makePaginationQuery( const q = makePaginationQuery(
Emojis.createQueryBuilder("emoji"), Emojis.createQueryBuilder("emoji"),

View file

@ -31,7 +31,7 @@ export const paramDef = {
required: ["ids", "aliases"], required: ["ids", "aliases"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const emojis = await Emojis.findBy({ const emojis = await Emojis.findBy({
id: In(ps.ids), id: In(ps.ids),

View file

@ -31,7 +31,7 @@ export const paramDef = {
required: ["ids", "aliases"], required: ["ids", "aliases"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
await Emojis.update( await Emojis.update(
{ {

View file

@ -30,7 +30,7 @@ export const paramDef = {
required: ["ids"], required: ["ids"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
await Emojis.update( await Emojis.update(
{ {

View file

@ -38,7 +38,7 @@ export const paramDef = {
required: ["id", "name", "aliases"], required: ["id", "name", "aliases"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const emoji = await Emojis.findOneBy({ id: ps.id }); const emoji = await Emojis.findOneBy({ id: ps.id });

View file

@ -17,7 +17,7 @@ export const paramDef = {
required: ["host"], required: ["host"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const files = await DriveFiles.findBy({ const files = await DriveFiles.findBy({
userHost: ps.host, userHost: ps.host,

View file

@ -18,7 +18,7 @@ export const paramDef = {
required: ["host"], required: ["host"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const instance = await Instances.findOneBy({ host: toPuny(ps.host) }); const instance = await Instances.findOneBy({ host: toPuny(ps.host) });

View file

@ -17,7 +17,7 @@ export const paramDef = {
required: ["host"], required: ["host"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const followings = await Followings.findBy({ const followings = await Followings.findBy({
followerHost: ps.host, followerHost: ps.host,

View file

@ -18,7 +18,7 @@ export const paramDef = {
required: ["host", "isSuspended"], required: ["host", "isSuspended"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const instance = await Instances.findOneBy({ host: toPuny(ps.host) }); const instance = await Instances.findOneBy({ host: toPuny(ps.host) });

View file

@ -14,7 +14,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async () => { export default define(meta, paramDef, async () => {
const stats = await db.query("SELECT * FROM pg_indexes;").then((recs) => { const stats = await db.query("SELECT * FROM pg_indexes;").then((recs) => {
const res = [] as { tablename: string; indexname: string }[]; const res = [] as { tablename: string; indexname: string }[];

View file

@ -26,7 +26,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async () => { export default define(meta, paramDef, async () => {
const sizes = await db const sizes = await db
.query(` .query(`

View file

@ -16,7 +16,7 @@ export const paramDef = {
required: ["userId"], required: ["userId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const ips = await UserIps.find({ const ips = await UserIps.find({
where: { userId: ps.userId }, where: { userId: ps.userId },

View file

@ -32,7 +32,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async () => { export default define(meta, paramDef, async () => {
const code = rndstr({ const code = rndstr({
length: 8, length: 8,

View file

@ -465,7 +465,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const instance = await fetchMeta(true); const instance = await fetchMeta(true);

View file

@ -17,7 +17,7 @@ export const paramDef = {
required: ["userId"], required: ["userId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const user = await Users.findOneBy({ id: ps.userId }); const user = await Users.findOneBy({ id: ps.userId });

View file

@ -17,7 +17,7 @@ export const paramDef = {
required: ["userId"], required: ["userId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const user = await Users.findOneBy({ id: ps.userId }); const user = await Users.findOneBy({ id: ps.userId });

View file

@ -33,7 +33,7 @@ export const paramDef = {
required: ["noteId", "expiresAt"], required: ["noteId", "expiresAt"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
const note = await getNote(ps.noteId, user).catch((err) => { const note = await getNote(ps.noteId, user).catch((err) => {
if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24")

View file

@ -15,7 +15,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
destroy(); destroy();

View file

@ -37,7 +37,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const jobs = await deliverQueue.getJobs(["delayed"]); const jobs = await deliverQueue.getJobs(["delayed"]);

View file

@ -37,7 +37,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const jobs = await inboxQueue.getJobs(["delayed"]); const jobs = await inboxQueue.getJobs(["delayed"]);

View file

@ -47,7 +47,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const deliverJobCounts = await deliverQueue.getJobCounts(); const deliverJobCounts = await deliverQueue.getJobCounts();
const inboxJobCounts = await inboxQueue.getJobCounts(); const inboxJobCounts = await inboxQueue.getJobCounts();

View file

@ -54,7 +54,7 @@ export const paramDef = {
required: ["inbox"], required: ["inbox"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
try { try {
if (new URL(ps.inbox).protocol !== "https:") throw new Error("https only"); if (new URL(ps.inbox).protocol !== "https:") throw new Error("https only");

View file

@ -46,7 +46,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
return await listRelay(); return await listRelay();
}); });

View file

@ -16,7 +16,7 @@ export const paramDef = {
required: ["inbox"], required: ["inbox"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
return await removeRelay(ps.inbox); return await removeRelay(ps.inbox);
}); });

View file

@ -33,7 +33,7 @@ export const paramDef = {
required: ["userId"], required: ["userId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const user = await Users.findOneBy({ id: ps.userId }); const user = await Users.findOneBy({ id: ps.userId });

View file

@ -21,7 +21,7 @@ export const paramDef = {
required: ["reportId"], required: ["reportId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const report = await AbuseUserReports.findOneByOrFail({ id: ps.reportId }); const report = await AbuseUserReports.findOneByOrFail({ id: ps.reportId });

View file

@ -18,7 +18,7 @@ export const paramDef = {
required: ["to", "subject", "text"], required: ["to", "subject", "text"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
await sendEmail(ps.to, ps.subject, ps.text, ps.text); await sendEmail(ps.to, ps.subject, ps.text, ps.text);
}); });

View file

@ -108,7 +108,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async () => { export default define(meta, paramDef, async () => {
const memStats = await si.mem(); const memStats = await si.mem();
const fsStats = await si.fsSize(); const fsStats = await si.fsSize();

View file

@ -66,7 +66,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const query = makePaginationQuery( const query = makePaginationQuery(
ModerationLogs.createQueryBuilder("report"), ModerationLogs.createQueryBuilder("report"),

View file

@ -22,7 +22,7 @@ export const paramDef = {
required: ["userId"], required: ["userId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const [user, profile] = await Promise.all([ const [user, profile] = await Promise.all([
Users.findOneBy({ id: ps.userId }), Users.findOneBy({ id: ps.userId }),

View file

@ -66,7 +66,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const query = Users.createQueryBuilder("user"); const query = Users.createQueryBuilder("user");

View file

@ -18,7 +18,7 @@ export const paramDef = {
required: ["userId"], required: ["userId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy({ id: ps.userId }); const user = await Users.findOneBy({ id: ps.userId });

View file

@ -21,7 +21,7 @@ export const paramDef = {
required: ["userId"], required: ["userId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy({ id: ps.userId }); const user = await Users.findOneBy({ id: ps.userId });

View file

@ -18,7 +18,7 @@ export const paramDef = {
required: ["userId"], required: ["userId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy({ id: ps.userId }); const user = await Users.findOneBy({ id: ps.userId });

View file

@ -18,7 +18,7 @@ export const paramDef = {
required: ["userId"], required: ["userId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy({ id: ps.userId }); const user = await Users.findOneBy({ id: ps.userId });

View file

@ -165,7 +165,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const set = {} as Partial<Meta>; const set = {} as Partial<Meta>;

View file

@ -17,7 +17,7 @@ export const paramDef = {
required: ["userId", "text"], required: ["userId", "text"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy({ id: ps.userId }); const user = await Users.findOneBy({ id: ps.userId });

View file

@ -18,7 +18,7 @@ export const paramDef = {
required: ["full", "analyze"], required: ["full", "analyze"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const params: string[] = []; const params: string[] = [];

View file

@ -72,7 +72,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery( const query = makePaginationQuery(
Announcements.createQueryBuilder("announcement"), Announcements.createQueryBuilder("announcement"),

View file

@ -82,7 +82,7 @@ export const paramDef = {
], ],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
if (user.movedToUri != null) throw new ApiError(meta.errors.noSuchUserGroup); if (user.movedToUri != null) throw new ApiError(meta.errors.noSuchUserGroup);
let userList; let userList;

View file

@ -27,7 +27,7 @@ export const paramDef = {
required: ["antennaId"], required: ["antennaId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
const antenna = await Antennas.findOneBy({ const antenna = await Antennas.findOneBy({
id: ps.antennaId, id: ps.antennaId,

View file

@ -27,7 +27,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const antennas = await Antennas.findBy({ const antennas = await Antennas.findBy({
userId: me.id, userId: me.id,

View file

@ -19,7 +19,7 @@ export const paramDef = {
required: ["antennaId"], required: ["antennaId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const antenna = await Antennas.findOneBy({ const antenna = await Antennas.findOneBy({
userId: me.id, userId: me.id,

View file

@ -48,7 +48,7 @@ export const paramDef = {
required: ["antennaId"], required: ["antennaId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
const antenna = await Antennas.findOneBy({ const antenna = await Antennas.findOneBy({
id: ps.antennaId, id: ps.antennaId,

View file

@ -33,7 +33,7 @@ export const paramDef = {
required: ["antennaId"], required: ["antennaId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
// Fetch the antenna // Fetch the antenna
const antenna = await Antennas.findOneBy({ const antenna = await Antennas.findOneBy({

View file

@ -89,7 +89,7 @@ export const paramDef = {
], ],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
// Fetch the antenna // Fetch the antenna
const antenna = await Antennas.findOneBy({ const antenna = await Antennas.findOneBy({

View file

@ -29,7 +29,7 @@ export const paramDef = {
required: ["uri"], required: ["uri"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
const resolver = new Resolver(); const resolver = new Resolver();
const object = await resolver.resolve(ps.uri); const object = await resolver.resolve(ps.uri);

View file

@ -83,7 +83,7 @@ export const paramDef = {
required: ["uri"], required: ["uri"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const object = await fetchAny(ps.uri, me); const object = await fetchAny(ps.uri, me);
if (object) { if (object) {

View file

@ -34,7 +34,7 @@ export const paramDef = {
required: ["name", "description", "permission"], required: ["name", "description", "permission"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
if (user?.movedToUri != null) if (user?.movedToUri != null)
return await Apps.pack("", null, { return await Apps.pack("", null, {

View file

@ -29,7 +29,7 @@ export const paramDef = {
required: ["appId"], required: ["appId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user, token) => { export default define(meta, paramDef, async (ps, user, token) => {
const isSecure = user != null && token == null; const isSecure = user != null && token == null;

View file

@ -29,7 +29,7 @@ export const paramDef = {
required: ["token"], required: ["token"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
// Fetch token // Fetch token
const session = await AuthSessions.findOneBy({ token: ps.token }); const session = await AuthSessions.findOneBy({ token: ps.token });

View file

@ -46,7 +46,7 @@ export const paramDef = {
required: ["appSecret"], required: ["appSecret"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
// Lookup app // Lookup app
const app = await Apps.findOneBy({ const app = await Apps.findOneBy({

View file

@ -49,7 +49,7 @@ export const paramDef = {
required: ["token"], required: ["token"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
// Lookup session // Lookup session
const session = await AuthSessions.findOneBy({ const session = await AuthSessions.findOneBy({

View file

@ -57,7 +57,7 @@ export const paramDef = {
required: ["appSecret", "token"], required: ["appSecret", "token"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps) => { export default define(meta, paramDef, async (ps) => {
// Lookup app // Lookup app
const app = await Apps.findOneBy({ const app = await Apps.findOneBy({

View file

@ -53,7 +53,7 @@ export const paramDef = {
required: ["userId"], required: ["userId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
const blocker = await Users.findOneByOrFail({ id: user.id }); const blocker = await Users.findOneByOrFail({ id: user.id });

View file

@ -53,7 +53,7 @@ export const paramDef = {
required: ["userId"], required: ["userId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
const blocker = await Users.findOneByOrFail({ id: user.id }); const blocker = await Users.findOneByOrFail({ id: user.id });

View file

@ -32,7 +32,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const query = makePaginationQuery( const query = makePaginationQuery(
Blockings.createQueryBuilder("blocking"), Blockings.createQueryBuilder("blocking"),

View file

@ -42,7 +42,7 @@ export const paramDef = {
required: ["name"], required: ["name"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
let banner = null; let banner = null;
if (ps.bannerId != null) { if (ps.bannerId != null) {

View file

@ -26,7 +26,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const query = Channels.createQueryBuilder("channel") const query = Channels.createQueryBuilder("channel")
.where("channel.lastNotedAt IS NOT NULL") .where("channel.lastNotedAt IS NOT NULL")

View file

@ -28,7 +28,7 @@ export const paramDef = {
required: ["channelId"], required: ["channelId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
const channel = await Channels.findOneBy({ const channel = await Channels.findOneBy({
id: ps.channelId, id: ps.channelId,

View file

@ -32,7 +32,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const query = makePaginationQuery( const query = makePaginationQuery(
ChannelFollowings.createQueryBuilder(), ChannelFollowings.createQueryBuilder(),

View file

@ -32,7 +32,7 @@ export const paramDef = {
required: [], required: [],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const query = makePaginationQuery( const query = makePaginationQuery(
Channels.createQueryBuilder(), Channels.createQueryBuilder(),

View file

@ -32,7 +32,7 @@ export const paramDef = {
required: ["channelId"], required: ["channelId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const channel = await Channels.findOneBy({ const channel = await Channels.findOneBy({
id: ps.channelId, id: ps.channelId,

View file

@ -44,7 +44,7 @@ export const paramDef = {
required: ["channelId"], required: ["channelId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
const channel = await Channels.findOneBy({ const channel = await Channels.findOneBy({
id: ps.channelId, id: ps.channelId,

View file

@ -27,7 +27,7 @@ export const paramDef = {
required: ["channelId"], required: ["channelId"],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
const channel = await Channels.findOneBy({ const channel = await Channels.findOneBy({
id: ps.channelId, id: ps.channelId,

Some files were not shown because too many files have changed in this diff Show more