Skip to content

Commit

Permalink
chore: fix ESLint errors (#10278)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung authored and existentialism committed Jul 29, 2019
1 parent 4f0840a commit f08062b
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions packages/babel-cli/src/babel/file.js
Expand Up @@ -103,24 +103,22 @@ export default async function({
}

function readStdin(): Promise<string> {
return new Promise(
(resolve: Function, reject: Function): void => {
let code = "";
return new Promise((resolve: Function, reject: Function): void => {
let code = "";

process.stdin.setEncoding("utf8");
process.stdin.setEncoding("utf8");

process.stdin.on("readable", function() {
const chunk = process.stdin.read();
// $FlowIgnore
if (chunk !== null) code += chunk;
});
process.stdin.on("readable", function() {
const chunk = process.stdin.read();
// $FlowIgnore
if (chunk !== null) code += chunk;
});

process.stdin.on("end", function() {
resolve(code);
});
process.stdin.on("error", reject);
},
);
process.stdin.on("end", function() {
resolve(code);
});
process.stdin.on("error", reject);
});
}

async function stdin(): Promise<void> {
Expand Down

0 comments on commit f08062b

Please sign in to comment.