eslint-formatter-mo
Advanced tools
Comparing version 1.2.1 to 1.3.0
@@ -0,1 +1,2 @@ | ||
/* eslint-disable no-magic-numbers */ | ||
const path = require( 'path' ) | ||
@@ -6,2 +7,3 @@ const chalk = require( 'chalk' ) | ||
const gradient = require( 'gradient-string' ) | ||
const link = require( 'terminal-link' ) | ||
const { locate } = require( './locator' ) | ||
@@ -45,3 +47,6 @@ | ||
const dirname = path.dirname( relativePath ) + path.sep | ||
let header = '\n ' + chalk.dim( dirname ) + chalk.dim.bold( basename ) + | ||
const formattedPath = chalk.dim( dirname ) + chalk.dim.bold( basename ) | ||
let header = '\n ' + link( formattedPath, `file://${ filePath }`, { | ||
fallback: () => formattedPath | ||
} ) + | ||
` 🔥${ errorCount > 0 ? ' ' : '' }` + | ||
@@ -63,9 +68,9 @@ [ errorSummary, warningSummary ].join( ' ' ) + | ||
) | ||
message = message.replace( /\s+$/, '' ); | ||
message = message.replace( /\s+$/, '' ) | ||
if ( Boolean( m.fix ) ) { | ||
if ( m.fix ) { | ||
autoFixableCount = autoFixableCount + 1 | ||
} | ||
const severity = (m.fatal || m.severity === 2 || m.severity === 'error' ) ? | ||
const severity = ( m.fatal || m.severity === 2 || m.severity === 'error' ) ? | ||
'error' : | ||
@@ -72,0 +77,0 @@ 'warning' |
@@ -0,1 +1,2 @@ | ||
/* eslint-disable no-magic-numbers */ | ||
const chalk = require( 'chalk' ) | ||
@@ -2,0 +3,0 @@ const emphasize = require( 'emphasize' ) |
{ | ||
"name": "eslint-formatter-mo", | ||
"description": "Good-lookin' ESLint formatter for delightful readability", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"main": "lib/index.js", | ||
@@ -29,3 +29,3 @@ "files": [ | ||
], | ||
"author": "", | ||
"author": "fengzilong", | ||
"license": "MIT", | ||
@@ -41,3 +41,4 @@ "bugs": { | ||
"plur": "^4.0.0", | ||
"string-width": "^4.2.0" | ||
"string-width": "^4.2.0", | ||
"terminal-link": "^2.1.1" | ||
}, | ||
@@ -44,0 +45,0 @@ "devDependencies": { |
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
11466
225
0
6
+ Addedterminal-link@^2.1.1
+ Addedansi-escapes@4.3.2(transitive)
+ Addedsupports-hyperlinks@2.3.0(transitive)
+ Addedterminal-link@2.1.1(transitive)
+ Addedtype-fest@0.21.3(transitive)