Fix Bug 2121: NG-UI uses unmaintained Chokidar version
- Upgraded Angular from 11 to 14 version to remove chokidar
unmaintained version.
- Changed linting tool tslint to eslint for angular 14 as tslint
is depreacted after angular 12
- Resolved linting issues from code
Change-Id: I00e908ab651db0f080e0d18a9d1c9711f4e36b91
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/directive/GoToTopDirective.ts b/src/directive/GoToTopDirective.ts
index 67cdc96..06a2462 100644
--- a/src/directive/GoToTopDirective.ts
+++ b/src/directive/GoToTopDirective.ts
@@ -32,6 +32,7 @@
/** Exporting a class @exports GoToTopDirective */
export class GoToTopDirective {
/** To set scroll top position @private */
+ // eslint-disable-next-line @typescript-eslint/no-magic-numbers
private topPosToStartShowing: number = 100;
/** Contains all methods related to shared @private */
@@ -44,6 +45,7 @@
* to listen the scroll event in DOM @public
*/
@HostListener('window:scroll') public enableGotoTop(): void {
+ // eslint-disable-next-line deprecation/deprecation
const scrollPosition: number = Math.max(window.pageYOffset, document.documentElement.scrollTop, document.body.scrollTop);
if (scrollPosition >= this.topPosToStartShowing) {
this.sharedService.showGotoTop = true;
@@ -51,5 +53,4 @@
this.sharedService.showGotoTop = false;
}
}
-
}