From 7d3174d46d8f19741ddfe06d758d701753f281a9 Mon Sep 17 00:00:00 2001 From: Quentin Date: Sun, 3 Nov 2024 15:33:09 +0100 Subject: [PATCH] Angular/ESLint: activate no-unsafe-call rule --- .../generator/client/angular/core/eslint.config.mjs.mustache | 1 - .../src/main/webapp/app/login/login.component.spec.ts.mustache | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/generator/client/angular/core/eslint.config.mjs.mustache b/src/main/resources/generator/client/angular/core/eslint.config.mjs.mustache index edf40964fcc..ea1e769ac82 100644 --- a/src/main/resources/generator/client/angular/core/eslint.config.mjs.mustache +++ b/src/main/resources/generator/client/angular/core/eslint.config.mjs.mustache @@ -60,7 +60,6 @@ export default tseslint.config( '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-argument': 'off', '@typescript-eslint/use-unknown-in-catch-callback-variable': 'off', - '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true }], }, }, diff --git a/src/main/resources/generator/client/angular/security/oauth2/src/main/webapp/app/login/login.component.spec.ts.mustache b/src/main/resources/generator/client/angular/security/oauth2/src/main/webapp/app/login/login.component.spec.ts.mustache index 9f8be58de42..17f784613cc 100644 --- a/src/main/resources/generator/client/angular/security/oauth2/src/main/webapp/app/login/login.component.spec.ts.mustache +++ b/src/main/resources/generator/client/angular/security/oauth2/src/main/webapp/app/login/login.component.spec.ts.mustache @@ -24,7 +24,8 @@ describe('LoginComponent', () => { it('should logout on click on logout button', () => { jest.spyOn(oauth2AuthService, 'logout').mockImplementation(); - fixture.debugElement.query(By.css('#btn-logout')).nativeElement.click(); + const logoutButton = fixture.debugElement.query(By.css('#btn-logout')).nativeElement as HTMLElement; + logoutButton.click(); expect(oauth2AuthService.logout).toHaveBeenCalledWith(); });