Fix ESLint errors in bin/pegjs

Fix the following errors:

   12:3  error  Unexpected console statement       no-console
   16:3  error  Unexpected console statement       no-console
   17:3  error  Unexpected console statement       no-console
   18:3  error  Unexpected console statement       no-console
   19:3  error  Unexpected console statement       no-console
   20:3  error  Unexpected console statement       no-console
   21:3  error  Unexpected console statement       no-console
   22:3  error  Unexpected console statement       no-console
   23:3  error  Unexpected console statement       no-console
   24:3  error  Unexpected console statement       no-console
   25:3  error  Unexpected console statement       no-console
   26:3  error  Unexpected console statement       no-console
   27:3  error  Unexpected console statement       no-console
   28:3  error  Unexpected console statement       no-console
   29:3  error  Unexpected console statement       no-console
   30:3  error  Unexpected console statement       no-console
   31:3  error  Unexpected console statement       no-console
   32:3  error  Unexpected console statement       no-console
   33:3  error  Unexpected console statement       no-console
   34:3  error  Unexpected console statement       no-console
   35:3  error  Unexpected console statement       no-console
   36:3  error  Unexpected console statement       no-console
   37:3  error  Unexpected console statement       no-console
   38:3  error  Unexpected console statement       no-console
   39:3  error  Unexpected console statement       no-console
   40:3  error  Unexpected console statement       no-console
   41:3  error  Unexpected console statement       no-console
   42:3  error  Unexpected console statement       no-console
   43:3  error  Unexpected console statement       no-console
   44:3  error  Unexpected console statement       no-console
   56:3  error  Unexpected console statement       no-console
  232:9  error  "inputStream" is already defined   no-redeclare
  240:9  error  "outputStream" is already defined  no-redeclare
redux
David Majda 9 years ago
parent ee66113130
commit c8d23e5471

@ -1,5 +1,7 @@
#!/usr/bin/env node
/* eslint no-console: 0 */
"use strict";
var fs = require("fs");
@ -219,17 +221,20 @@ while (args.length > 0 && isOption(args[0])) {
nextArg();
}
var inputStream;
var outputStream;
switch (args.length) {
case 0:
process.stdin.resume();
var inputStream = process.stdin;
var outputStream = process.stdout;
inputStream = process.stdin;
outputStream = process.stdout;
break;
case 1:
case 2:
var inputFile = args[0];
var inputStream = fs.createReadStream(inputFile);
inputStream = fs.createReadStream(inputFile);
inputStream.on("error", function() {
abort("Can't read from file \"" + inputFile + "\".");
});
@ -237,7 +242,7 @@ switch (args.length) {
var outputFile = args.length === 1
? args[0].replace(/\.[^.]*$/, ".js")
: args[1];
var outputStream = fs.createWriteStream(outputFile);
outputStream = fs.createWriteStream(outputFile);
outputStream.on("error", function() {
abort("Can't write to file \"" + outputFile + "\".");
});

Loading…
Cancel
Save