Skip to content

Commit

Permalink
Pass console object that wraps this.ui
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchlloyd committed Aug 7, 2016
1 parent c61eefe commit fa91550
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {

lintTree: function(type, tree) {
var project = this.project;
var ui = this.ui;

if (type === 'templates') {
return undefined;
Expand Down Expand Up @@ -60,6 +61,16 @@ module.exports = {
passed: passed,
errorMessage: relativePath + ' should pass ESLint.' + messages
}]);
},

console: {
log: function(message) {
ui.writeLine(message);
},

error: function(message) {
ui.writeLine(message, 'ERROR');
}
}
});
}
Expand Down

0 comments on commit fa91550

Please sign in to comment.