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",
"workspace.workspaceFolderCheckCwd": false,
"workspace.workspaceFolderCheckCwd": false
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -10,7 +10,7 @@
"revertmigration": "typeorm migration:revert -d ormconfig.js",
"build": "pnpm swc src -d built -D",
"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",
"test": "pnpm run mocha"
},
@ -178,11 +178,7 @@
"@types/web-push": "3.3.2",
"@types/websocket": "1.0.5",
"@types/ws": "8.5.3",
"@typescript-eslint/eslint-plugin": "5.46.1",
"@typescript-eslint/parser": "5.46.1",
"cross-env": "7.0.3",
"eslint": "8.31.0",
"eslint-plugin-import": "2.26.0",
"execa": "6.1.0",
"swc-loader": "^0.2.3",
"typescript": "4.9.4",

View file

@ -66,7 +66,6 @@ export function genIdenticon(seed: string, stream: WriteStream): Promise<void> {
// 1*n (filled by 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 y = 0; y < side[x].length; y++) {
side[x][y] = rand(3) === 0;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

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