fix tslint error and add and block if tslint give error in the pipeline

This commit is contained in:
Eugenio Romano
2018-05-10 17:01:27 +01:00
parent ae9c9e6869
commit c1a8d60ac1
2 changed files with 5 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ export interface HightlightTransformResult {
text: string; text: string;
changed: boolean; changed: boolean;
} }
export class HighlightTransformService { export class HighlightTransformService {
/** /**
@@ -26,7 +27,7 @@ export class HighlightTransformService {
* @param text Text to search within * @param text Text to search within
* @param search Text pattern to search for * @param search Text pattern to search for
* @param wrapperClass CSS class used to provide highlighting style * @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 { public highlight(text: string, search: string, wrapperClass: string = 'highlight'): HightlightTransformResult {
let isMatching = false, let isMatching = false,
@@ -43,9 +44,9 @@ export class HighlightTransformService {
isMatching = true; isMatching = true;
return `<span class="${wrapperClass}">${match}</span>`; return `<span class="${wrapperClass}">${match}</span>`;
}); });
return { text: result, changed: isMatching}; return { text: result, changed: isMatching };
} else { } else {
return { text: result, changed: isMatching}; return { text: result, changed: isMatching };
} }
} }
} }

View File

@@ -5,7 +5,7 @@ cd $DIR/..
echo "====== lint =====" echo "====== lint ====="
npm run lint-lib npm run lint-lib || exit 1
echo "====== clean =====" echo "====== clean ====="