Skip to content

Commit

Permalink
Update: add eslint version to error output. (fixes #9037) (#9071)
Browse files Browse the repository at this point in the history
* Update: add eslint version to error output. (fixes #9037)

* use  pkg.version.

* Fix: accept review suggestions.
  • Loading branch information
aladdin-add authored and ilyavolodin committed Sep 1, 2017
1 parent 0e09973 commit 6becf91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/eslint.js
Expand Up @@ -43,9 +43,10 @@ process.once("uncaughtException", err => {

if (typeof err.messageTemplate === "string" && err.messageTemplate.length > 0) {
const template = lodash.template(fs.readFileSync(path.resolve(__dirname, `../messages/${err.messageTemplate}.txt`), "utf-8"));
const pkg = require("../package.json");

console.error("\nOops! Something went wrong! :(");
console.error(`\n${template(err.messageData || {})}`);
console.error(`\nESLint: ${pkg.version}.\n${template(err.messageData || {})}`);
} else {

console.error(err.message);
Expand Down

0 comments on commit 6becf91

Please sign in to comment.