mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
workspace: update eslint rule (#1027)
This commit is contained in:
1 parent
05c3b8f2bd
commit
cee3c00ddb
150 files changed
+1069
-1043
No files matched your search
@@ -1,4 +1,4 @@
|
||||
/* eslint-disable no-tabs */
|
||||
/* eslint-disable style/no-tabs */
|
||||
/* eslint-disable no-await-in-loop */
|
||||
import path from 'path';
|
||||
import mariadb from 'mariadb';
|
||||
@@ -70,7 +70,7 @@ export async function run({
|
||||
host = 'localhost', port = 3306, name = 'jol',
|
||||
username, password, domainId, contestType = 'oi',
|
||||
dataDir, uploadDir = '/home/judge/src/web/upload/', rerun = true, randomMail = false,
|
||||
}, report: Function) {
|
||||
}, report: (data: any) => void) {
|
||||
let remoteUsed = false;
|
||||
const src = await mariadb.createConnection({
|
||||
host,
|
||||
@@ -191,7 +191,7 @@ export async function run({
|
||||
samples: [[pdoc.sample_input.trim(), pdoc.sample_output.trim()]],
|
||||
hint: pdoc.hint,
|
||||
source: pdoc.source,
|
||||
}, 'html').replace(/<math xm<x>lns=/g, '<math xmlns=').replace(/\[\/?md]/g, '');
|
||||
}, 'html').replace(/<math xm<x>lns=/g, '<math xmlns=').replace(/\[\/?md\]/g, '');
|
||||
const uploadFiles = content.matchAll(/(?:src|href)="\/upload\/([^"/]+)(?:\/([^"/]+))?\/([^"/]+\.[^"/.]+)"/g);
|
||||
for (const file of uploadFiles) {
|
||||
try {
|
||||
@@ -295,7 +295,7 @@ hydrooj install https://hydro.ac/hydroac-client.zip
|
||||
await Promise.all(Object.keys(files).map((filename) => addContestFile(domainId, tid, filename, files[filename])));
|
||||
if (Object.keys(files).length) report({ message: `move ${Object.keys(files).length} file for contest ${tidMap[tdoc.contest_id]}` });
|
||||
|
||||
const allowedUser:{ user_id:string }[] = await query(`SELECT * FROM privilege WHERE rightstr = 'c${tdoc.contest_id}';`);
|
||||
const allowedUser: { user_id: string }[] = await query(`SELECT * FROM privilege WHERE rightstr = 'c${tdoc.contest_id}';`);
|
||||
const assignUserList = allowedUser.map((i) => uidMap[i.user_id]).filter((i) => i);
|
||||
if (isAssignMode) {
|
||||
await ContestModel.edit(domainId, tid, {
|
||||
|
||||
Reference in new issue
Block a user