mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-03 09:49:24 +02:00
29 lines
685 B
JavaScript
Executable file
29 lines
685 B
JavaScript
Executable file
#!/usr/bin/env node
|
|
|
|
import { spawn } from "node:child_process";
|
|
import { once } from "node:events";
|
|
import { resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const __dirname = resolve(fileURLToPath(import.meta.url), "..");
|
|
|
|
let eslint = resolve(__dirname, "node_modules", ".bin", "eslint");
|
|
if (process.platform === "win32") {
|
|
eslint += ".cmd";
|
|
}
|
|
|
|
const child = spawn(
|
|
eslint,
|
|
["--config", resolve(__dirname, "eslint.config.js"), "--fix", "."],
|
|
{
|
|
// https://github.com/nodejs/node/issues/52554
|
|
shell: true,
|
|
stdio: "inherit",
|
|
},
|
|
);
|
|
|
|
await once(child, "exit");
|
|
|
|
if (child.exitCode) {
|
|
process.exit(child.exitCode);
|
|
}
|