chore: fix ESLint errors (#10278)
This commit is contained in:
parent
4f0840ab88
commit
f08062b1de
@ -103,24 +103,22 @@ export default async function({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function readStdin(): Promise<string> {
|
function readStdin(): Promise<string> {
|
||||||
return new Promise(
|
return new Promise((resolve: Function, reject: Function): void => {
|
||||||
(resolve: Function, reject: Function): void => {
|
let code = "";
|
||||||
let code = "";
|
|
||||||
|
|
||||||
process.stdin.setEncoding("utf8");
|
process.stdin.setEncoding("utf8");
|
||||||
|
|
||||||
process.stdin.on("readable", function() {
|
process.stdin.on("readable", function() {
|
||||||
const chunk = process.stdin.read();
|
const chunk = process.stdin.read();
|
||||||
// $FlowIgnore
|
// $FlowIgnore
|
||||||
if (chunk !== null) code += chunk;
|
if (chunk !== null) code += chunk;
|
||||||
});
|
});
|
||||||
|
|
||||||
process.stdin.on("end", function() {
|
process.stdin.on("end", function() {
|
||||||
resolve(code);
|
resolve(code);
|
||||||
});
|
});
|
||||||
process.stdin.on("error", reject);
|
process.stdin.on("error", reject);
|
||||||
},
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function stdin(): Promise<void> {
|
async function stdin(): Promise<void> {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user