Skip to content

Log the parser we're using at run time #65

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. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 26, 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
2 changes: 2 additions & 0 deletions bin/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ var cli = new CLIEngine(options);
var debug = false;
var checks = require("../lib/checks");

console.error("ESLint is running with the " + cli.getConfigForFile(null).parser + " parser.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we already set console.log to console.error to achieve the right semantics re output streams automatically, I'd probably use console.log for our own logging too, to be consistent. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already use console.error elsewhere in the script for our own logging, so I actually think sticking with .error is more consistent. The console.log change was made mainly (IMHO) to prevent code deep in the innards of ESLint or plugins from ruining our day. For our own code, we've mostly used .error so far, and personally I think we should continue to because it's more explicit. If we were going to switch to .log, though, I'd say that should be a separate refactor PR, so I'd still argue to keep this commit as-is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Makes sense given the current state of the code not visible in the diff.


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