mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
workspace: add eslint-config package (#510)
This commit is contained in:
1 parent
e7945a104f
commit
65311529bd
28 files changed
+230
-267
No files matched your search
@@ -33,7 +33,6 @@ export class HydroError extends Error {
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
msg() {
|
||||
return 'HydroError';
|
||||
}
|
||||
|
||||
@@ -771,13 +771,9 @@ export class ProblemFilesHandler extends ProblemDetailHandler {
|
||||
}
|
||||
}
|
||||
for (const entry of files) {
|
||||
if (entry.type === 'testdata') {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await problem.addTestdata(domainId, this.pdoc.docId, entry.name, entry.data(), this.user._id);
|
||||
} else {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await problem.addAdditionalFile(domainId, this.pdoc.docId, entry.name, entry.data(), this.user._id);
|
||||
}
|
||||
const method = entry.type === 'testdata' ? 'addTestdata' : 'addAdditionalFile';
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await problem[method](domainId, this.pdoc.docId, entry.name, entry.data(), this.user._id);
|
||||
}
|
||||
this.back();
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ class RatingCalculator {
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
calP(a: User, b: User) {
|
||||
return 1 / (1 + 10 ** ((b.old - a.old) / 400));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user