Skip to content

Commit

Permalink
also print the column in the filename heading
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Apr 21, 2016
1 parent cdd32ac commit 0dd8eb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = function (results) {
type: 'header',
filePath: filePath,
relativeFilePath: path.relative('.', filePath),
firstLine: messages[0].line
firstLineCol: messages[0].line + ':' + messages[0].column
});

messages.forEach(function (x) {
Expand Down Expand Up @@ -80,7 +80,7 @@ module.exports = function (results) {
if (x.type === 'header') {
// add the line number so it's Cmd+click'able in some terminals
// use dim & gray for terminals like iTerm that doesn't support `hidden`
return ' ' + chalk.underline(x.relativeFilePath + chalk.hidden.dim.gray(':' + x.firstLine));
return ' ' + chalk.underline(x.relativeFilePath + chalk.hidden.dim.gray(':' + x.firstLineCol));
}

if (x.type === 'message') {
Expand Down

0 comments on commit 0dd8eb7

Please sign in to comment.