File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -11,29 +11,29 @@ function padLeft(number, length) {
11
11
12
12
module . exports = function reportLikeJshint ( file , error ) {
13
13
let line
14
- let exzerpt
14
+ let excerpt
15
15
let pointer
16
16
let reason
17
17
if ( error . location ) {
18
18
; ( { line } = error . location . start )
19
- ; ( { exzerpt , pointer, reason } = error )
19
+ ; ( { excerpt , pointer, reason } = error )
20
20
} else {
21
21
return error . message
22
22
}
23
23
const extraLength = pointer . length - 10
24
24
if ( extraLength > 0 ) {
25
25
pointer = ` ${ pointer . substr ( extraLength ) } `
26
- exzerpt = `...${ exzerpt . substr ( extraLength ) } `
26
+ excerpt = `...${ excerpt . substr ( extraLength ) } `
27
27
}
28
- if ( exzerpt . length > 20 ) {
29
- exzerpt = `${ exzerpt . substr ( 0 , 20 ) } ...`
28
+ if ( excerpt . length > 20 ) {
29
+ excerpt = `${ excerpt . substr ( 0 , 20 ) } ...`
30
30
}
31
31
pointer = pointer . replace ( / - / g, ' ' )
32
32
const prefix = `${ padLeft ( line , 6 ) } | `
33
33
const indent = ' ' . repeat ( prefix . length )
34
34
return (
35
35
colors . magenta ( prefix ) +
36
- colors . black ( exzerpt ) +
36
+ colors . black ( excerpt ) +
37
37
'\n' +
38
38
colors . red ( `${ indent } ${ pointer } ${ reason } ` )
39
39
)
You can’t perform that action at this time.
0 commit comments