10000 Do the console redirect earlier by gdiggs · Pull Request #55 · codeclimate/codeclimate-eslint · GitHub
[go: up one dir, main page]

Skip to content

Do the console redirect earlier #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement< 8000 /a>. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions bin/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

process.chdir('/code');

// Redirect `console.log` so that we are the only ones
// writing to STDOUT
var stdout = console.log;
console.log = console.error;

var CLIEngine = require("eslint").CLIEngine;
var docs = require("eslint").docs;
var fs = require("fs");
Expand All @@ -11,9 +16,6 @@ var cli = new CLIEngine(options);
var debug = false;
var checks = require("../lib/checks");

var stdout = console.log
console.log = console.error

// a wrapper for emitting perf timing
function runWithTiming(name, fn) {
var start = new Date(),
Expand Down
0