jshint-stylish
Advanced tools
Comparing version 0.1.5 to 0.2.0
{ | ||
"name": "jshint-stylish", | ||
"version": "0.1.5", | ||
"version": "0.2.0", | ||
"description": "Stylish reporter for JSHint", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -1,2 +0,2 @@ | ||
# jshint-stylish [](http://travis-ci.org/sindresorhus/jshint-stylish) | ||
# jshint-stylish [](https://travis-ci.org/sindresorhus/jshint-stylish) | ||
@@ -14,3 +14,5 @@ > Stylish reporter for [JSHint](https://github.com/jshint/jshint) | ||
Install with [npm](https://npmjs.org/package/jshint-stylish): `npm install --save-dev jshint-stylish` | ||
```bash | ||
$ npm install --save-dev jshint-stylish | ||
``` | ||
@@ -57,2 +59,2 @@ | ||
MIT © [Sindre Sorhus](http://sindresorhus.com) | ||
[MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com) |
@@ -16,2 +16,5 @@ 'use strict'; | ||
var err = el.error; | ||
// E: Error, W: Warning, I: Info | ||
var isError = err.code && err.code[0] === 'E'; | ||
var line = [ | ||
@@ -21,3 +24,3 @@ '', | ||
chalk.gray('col ' + err.character), | ||
chalk.blue(err.reason) | ||
isError ? chalk.red(err.reason) : chalk.blue(err.reason) | ||
]; | ||
@@ -45,5 +48,5 @@ | ||
if (total > 0) { | ||
ret += chalk.red.bold((process.platform !== 'win32' ? '✖ ' : '') + total + ' problem' + (total === 1 ? '' : 's')); | ||
ret += chalk.red((process.platform !== 'win32' ? '✖ ' : '') + total + ' problem' + (total === 1 ? '' : 's')); | ||
} else { | ||
ret += chalk.green.bold((process.platform !== 'win32' ? '✔ ' : '') + 'No problems'); | ||
ret += chalk.green((process.platform !== 'win32' ? '✔ ' : '') + 'No problems'); | ||
ret = '\n' + ret.trim(); | ||
@@ -50,0 +53,0 @@ } |
3168
45
59