workspace: update eslint rule (#1027)

This commit is contained in:
undefined authored and GitHub committed 2025-08-06 18:51:25 +01:00
1 parent 05c3b8f2bd
commit cee3c00ddb
150 files changed
+1069 -1043

No files matched your search

@@ -84,13 +84,13 @@ export default async function download(filename, targets) {
declare module '../../api' {
interface EventMap {
'problemset/download': (pids: number[], name: string, targets: { filename: string; url?: string; content?: string }[]) => void;
'problemset/download': (pids: number[], name: string, targets: { filename: string, url?: string, content?: string }[]) => void;
}
}
export async function downloadProblemSet(pids, name = 'Export') {
Notification.info(i18n('Downloading...'));
const targets: { filename: string; url?: string; content?: string }[] = [];
const targets: { filename: string, url?: string, content?: string }[] = [];
try {
await ctx.serial('problemset/download', pids, name, targets);
for (const pid of pids) {
@@ -122,7 +122,7 @@ export async function downloadProblemSet(pids, name = 'Export') {
});
try {
const c = JSON.parse(pdoc.content);
if (c instanceof Array || typeof c === 'string') throw new Error();
if (c instanceof Array || typeof c === 'string') throw new Error('Invalid content');
for (const key of Object.keys(c)) {
targets.push({
filename: `${pid}/problem_${key}.md`,