Zhihui-Platform / client

async function should have await expression JS-0116
Bug risk
Minor
a year agoa year old
Found async function without any await expressions
14  });
15}
16
17export async function exportSlides(18  dir: string,19  options: {20    dark?: boolean;21    range?: string;22    withClicks?: boolean;23    output: "pdf" | "png" | "md";24  },25  npx: string26) {27  const script = `${npx} slidev export --format ${options.output} ${28    options.withClicks ? "--with-clicks" : ""29  } ${options.range ? "--range " + options.range : ""} ${30    options.dark ? "--dark" : ""31  } --timeout 120000`;32  execSync(script, {33    cwd: dir,34  });35}36
37createServer("J:\\co-operation\\test3", "npx");
Found async function without any await expressions
 7  });
 8}
 9
10export async function buildSlides(dir: string, npx: string) {11  const script = `${npx} slidev build --download`;12  execSync(script, {13    cwd: dir,14  });15}16
17export async function exportSlides(
18  dir: string,
Found async function without any await expressions
 1import { exec as $, execSync } from "node:child_process";
 2
 3export async function createServer(dir: string, npx: string) { 4  const script = `${npx} slidev`; 5  return $(script, { 6    cwd: dir, 7  }); 8} 9
10export async function buildSlides(dir: string, npx: string) {
11  const script = `${npx} slidev build --download`;