From c1a8d60ac1d488d127a492d2ae49313ff24e8118 Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Thu, 10 May 2018 17:01:27 +0100 Subject: [PATCH] fix tslint error and add and block if tslint give error in the pipeline --- lib/core/services/highlight-transform.service.ts | 7 ++++--- scripts/ng-packagr.sh | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/core/services/highlight-transform.service.ts b/lib/core/services/highlight-transform.service.ts index ab5c4722f5..3eb124c7b1 100644 --- a/lib/core/services/highlight-transform.service.ts +++ b/lib/core/services/highlight-transform.service.ts @@ -19,6 +19,7 @@ export interface HightlightTransformResult { text: string; changed: boolean; } + export class HighlightTransformService { /** @@ -26,7 +27,7 @@ export class HighlightTransformService { * @param text Text to search within * @param search Text pattern to search for * @param wrapperClass CSS class used to provide highlighting style - * @returns New text along with boolean value to indicate whether anything was highlighted + * @returns New text along with boolean value to indicate whether anything was highlighted */ public highlight(text: string, search: string, wrapperClass: string = 'highlight'): HightlightTransformResult { let isMatching = false, @@ -43,9 +44,9 @@ export class HighlightTransformService { isMatching = true; return `${match}`; }); - return { text: result, changed: isMatching}; + return { text: result, changed: isMatching }; } else { - return { text: result, changed: isMatching}; + return { text: result, changed: isMatching }; } } } diff --git a/scripts/ng-packagr.sh b/scripts/ng-packagr.sh index e22c15cce1..42818bcbff 100755 --- a/scripts/ng-packagr.sh +++ b/scripts/ng-packagr.sh @@ -5,7 +5,7 @@ cd $DIR/.. echo "====== lint =====" -npm run lint-lib +npm run lint-lib || exit 1 echo "====== clean ====="