File tree 2 files changed +2
-6
lines changed
2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,10 @@ LinterTslint = (function (_super) {
24
24
}
25
25
LinterTslint . syntax = [ 'source.ts' ] ;
26
26
LinterTslint . prototype . lintFile = function ( filePath , callback ) {
27
- var contents , fileName ;
28
27
filePath = this . editor . buffer . file . path ;
29
28
if ( ! fs . existsSync ( filePath ) )
30
29
return callback ( [ ] ) ;
31
- contents = this . editor . getText ( ) ;
32
- fileName = path . basename ( filePath ) ;
30
+ var fileName = path . basename ( filePath ) ;
33
31
var errors = programManager . getErrorsForFileFiltered ( filePath ) ;
34
32
var linterErrors = errors . map ( function ( err ) { return {
35
33
message : err . message ,
Original file line number Diff line number Diff line change @@ -38,14 +38,12 @@ LinterTslint = (function (_super) {
38
38
( < any > LinterTslint ) . syntax = [ 'source.ts' ] ;
39
39
40
40
LinterTslint . prototype . lintFile = function ( filePath , callback : ( errors : LinterError [ ] ) => any ) {
41
- var contents , fileName ;
42
41
filePath = this . editor . buffer . file . path ;
43
42
44
43
// We refuse to work on files that are not on disk.
45
44
if ( ! fs . existsSync ( filePath ) ) return callback ( [ ] ) ;
46
45
47
- contents = this . editor . getText ( ) ;
48
- fileName = path . basename ( filePath ) ;
46
+ var fileName = path . basename ( filePath ) ;
49
47
50
48
var errors = programManager . getErrorsForFileFiltered ( filePath ) ;
51
49
var linterErrors : LinterError [ ] = errors . map ( ( err ) => < LinterError > {
You can’t perform that action at this time.
0 commit comments