@@ -22,19 +22,16 @@ export function lint(context?: BuildContext, configFile?: string) {
22
22
23
23
24
24
export function lintWorker ( context : BuildContext , configFile : string ) {
25
+ const logger = new Logger ( 'lint' ) ;
25
26
return getLintConfig ( context , configFile ) . then ( configFile => {
26
27
// there's a valid tslint config, let's continue
27
- const logger = new Logger ( 'lint' ) ;
28
-
29
- return lintApp ( context , configFile )
30
- . then ( ( ) => {
31
- // always finish and resolve
32
- logger . finish ( ) ;
33
-
34
- } ) . catch ( ( ) => {
35
- // always finish and resolve
36
- logger . finish ( ) ;
37
- } ) ;
28
+ return lintApp ( context , configFile ) ;
29
+ } ) . then ( ( ) => {
30
+ // always finish and resolve
31
+ logger . finish ( ) ;
32
+ } ) . catch ( ( ) => {
33
+ // always finish and resolve
34
+ logger . finish ( ) ;
38
35
} ) ;
39
36
}
40
37
@@ -55,15 +52,11 @@ export function lintUpdate(event: string, filePath: string, context: BuildContex
55
52
56
53
export function lintUpdateWorker ( context : BuildContext , workerConfig : LintWorkerConfig ) {
57
54
return getLintConfig ( context , workerConfig . configFile ) . then ( configFile => {
58
- // there's a valid tslint config, let's continue (but be quiet about it!)
59
- const program = createProgram ( configFile , context . srcDir ) ;
60
- return lintFile ( context , program , workerConfig . filePath ) ;
61
-
62
- } , ( ) => {
63
- // rejected, but let's ignore
64
- } ) . catch ( ( ) => {
65
- // error, but whateves
66
- } ) ;
55
+ // there's a valid tslint config, let's continue (but be quiet about it!)
56
+ const program = createProgram ( configFile , context . srcDir ) ;
57
+ return lintFile ( context , program , workerConfig . filePath ) ;
58
+ } ) . catch ( ( ) => {
59
+ } ) ;
67
60
}
68
61
69
62
0 commit comments