@@ -44,7 +44,7 @@ if (String.prototype.padStart) {
44
44
} ;
45
45
}
46
46
47
- function justify ( left , right , width ) {
47
+ function justify ( left , right , width ) {
48
48
if ( left ) {
49
49
width -= stringWidth ( left ) ;
50
50
} else {
@@ -57,7 +57,7 @@ function justify(left, right, width) {
57
57
}
58
58
return left + ' ' . repeat ( Math . max ( width , left && right ? 1 : 0 ) ) + right ;
59
59
}
60
- function timeFormat ( timestamp ) {
60
+ function timeFormat ( timestamp ) {
61
61
timestamp = new Date ( timestamp * 1000 ) ;
62
62
return [
63
63
timestamp . getFullYear ( ) ,
@@ -70,7 +70,7 @@ function timeFormat(timestamp) {
70
70
] . join ( ':' ) ;
71
71
}
72
72
73
- function highlight ( error ) {
73
+ function highlight ( error ) {
74
74
let source = error . source . replace ( / \t / g, ' ' ) ;
75
75
if ( chalk . enabled ) {
76
76
const extname = path . extname ( error . fileName ) . slice ( 1 ) ;
@@ -86,8 +86,8 @@ function highlight(error) {
86
86
return source ;
87
87
}
88
88
89
- function addLineNumbers ( code , line , fmtOpts ) {
90
- function add ( s ) {
89
+ function addLineNumbers ( code , line , fmtOpts ) {
90
+ function add ( s ) {
91
91
let prefix = ' ' . repeat ( fmtOpts . columnNumberWidth + 1 ) ;
92
92
prefix += chalk . yellow ( padNum ( line , fmtOpts . lineNumberWidth ) + ' | ' ) ;
93
93
line ++ ;
@@ -96,7 +96,7 @@ function addLineNumbers(code, line, fmtOpts) {
96
96
return code . replace ( / ^ .* $ / gm, add ) ;
97
97
}
98
98
99
- function formatError ( error , fmtOpts ) {
99
+ function formatError ( error , fmtOpts ) {
100
100
const message = [ ] ;
101
101
let severity = error . severity ;
102
102
if ( error . demote || ! severity || ! icons [ severity ] ) {
@@ -128,7 +128,7 @@ function formatError(error, fmtOpts) {
128
128
subMsg . push ( chalk . underline ( link ) ) ;
129
129
}
130
130
if ( subMsg . length ) {
131
- subMsg = `(${ subMsg . join ( ' ' ) . trim ( ) } )` ;
131
+ subMsg = `(${ subMsg . join ( ' ' ) . trim ( ) } )` ;
132
132
if ( stringWidth ( mainMessage ) + stringWidth ( subMsg ) >= fmtOpts . termColumns ) {
133
133
message . push ( mainMessage , justify (
134
134
null ,
@@ -174,7 +174,7 @@ function formatError(error, fmtOpts) {
174
174
)
175
175
} ${
176
176
justify (
177
- `<${ error . blame . author . mail } >` ,
177
+ `<${ error . blame . author . mail } >` ,
178
178
null ,
179
179
fmtOpts . maxEmailWidth + 2
180
180
)
@@ -198,7 +198,7 @@ function formatError(error, fmtOpts) {
198
198
return message . join ( '\n' ) ;
199
199
}
200
200
201
- function formatter ( file , options ) {
201
+ function formatter ( file , options ) {
202
202
const sourceCache = { } ;
203
203
let maxLineNumber = 0 ;
204
204
let maxColumnNumber = 0 ;
0 commit comments