Skip to content

Commit d6e3be4

Browse files
authored
Fix/752 fixed compiler warnings UI (#777)
Fix/752 fixed compiler warnings UI (#777)
1 parent 407964c commit d6e3be4

35 files changed

+3054
-3628
lines changed

ui/.eslintrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,14 @@ module.exports = {
2424
parserOptions: {
2525
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
2626
sourceType: "module" // Allows for the use of imports
27+
},
28+
rules: {
29+
"@typescript-eslint/no-explicit-any": "off",
30+
"@typescript-eslint/no-unused-vars": [
31+
"warn",
32+
{
33+
"argsIgnorePattern": "_",
34+
}
35+
]
2736
}
2837
};

ui/angular.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
"node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js",
3838
"node_modules/@clr/icons/clr-icons.min.js"
3939
],
40+
"allowedCommonJsDependencies": [
41+
"fast-deep-equal"
42+
],
4043
"vendorChunk": true,
4144
"extractLicenses": false,
4245
"buildOptimizer": false,
@@ -133,5 +136,8 @@
133136
}
134137
}
135138
}
139+
},
140+
"cli": {
141+
"analytics": false
136142
}
137143
}

ui/package-lock.json

Lines changed: 1835 additions & 2438 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@
4141
},
4242
"devDependencies": {
4343
"@angular-devkit/build-angular": "^14.2.10",
44-
"@angular-eslint/builder": "1.2.0",
45-
"@angular-eslint/eslint-plugin": "1.2.0",
46-
"@angular-eslint/eslint-plugin-template": "1.2.0",
47-
"@angular-eslint/schematics": "1.2.0",
48-
"@angular-eslint/template-parser": "1.2.0",
44+
"@angular-eslint/builder": "^14.2.0",
45+
"@angular-eslint/eslint-plugin": "^14.2.0",
46+
"@angular-eslint/eslint-plugin-template": "^14.2.0",
47+
"@angular-eslint/schematics": "^14.2.0",
48+
"@angular-eslint/template-parser": "^14.2.0",
4949
"@angular/cli": "^14.2.10",
5050
"@angular/compiler-cli": "^14.2.12",
5151
"@angular/language-service": "^14.2.12",
5252
"@types/jasmine": "~3.6.0",
5353
"@types/jasminewd2": "~2.0.3",
5454
"@types/node": "^12.11.1",
55-
"@typescript-eslint/eslint-plugin": "5.12.0",
56-
"@typescript-eslint/parser": "5.12.0",
57-
"eslint": "^8.9.0",
55+
"@typescript-eslint/eslint-plugin": "5.49.0",
56+
"@typescript-eslint/parser": "5.49.0",
57+
"eslint": "^8.32.0",
5858
"eslint-config-prettier": "^6.10.1",
5959
"eslint-plugin-import": "2.25.4",
6060
"eslint-plugin-jsdoc": "37.9.3",

ui/src/app/components/admin/job-templates/job-templates-form/job-templates-form.component.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ describe('JobTemplatesFormComponent', () => {
112112
it(
113113
'createJobTemplate() should not dispatch create job template when dialog is not confirmed',
114114
waitForAsync(() => {
115-
const id = 1;
116115
underTest.jobTemplateForm = { form: { valid: true } };
117116
const subject = new Subject<boolean>();
118117
const storeSpy = spyOn(store, 'dispatch');
@@ -156,7 +155,6 @@ describe('JobTemplatesFormComponent', () => {
156155
it(
157156
'updateJobTemplate() should not dispatch update job template when dialog is not confirmed',
158157
waitForAsync(() => {
159-
const id = 1;
160158
underTest.jobTemplateForm = { form: { valid: true } };
161159
const subject = new Subject<boolean>();
162160
const storeSpy = spyOn(store, 'dispatch');

ui/src/app/components/admin/job-templates/job-templates-form/job-templates-form.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export class JobTemplatesFormComponent implements OnDestroy {
168168
if (value == this.jobTypes.SHELL) {
169169
return this.jobTypesMap;
170170
}
171-
return new Map([...this.jobTypesMap.entries()].filter(([k, v]) => v !== this.jobTypes.SHELL));
171+
return new Map([...this.jobTypesMap.entries()].filter(([_, v]) => v !== this.jobTypes.SHELL));
172172
}
173173

174174
ngOnDestroy(): void {

ui/src/app/components/admin/notification-rules/notification-rule/notification-rule.component.spec.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
1717

1818
import { provideMockStore } from '@ngrx/store/testing';
19-
import { ActivatedRoute, Router } from '@angular/router';
19+
import { ActivatedRoute } from '@angular/router';
2020
import { of } from 'rxjs';
2121
import { RouterTestingModule } from '@angular/router/testing';
2222
import { Store } from '@ngrx/store';
@@ -30,9 +30,7 @@ import { NotificationRuleChanged } from '../../../../stores/notification-rules/n
3030
describe('NotificationRuleComponent', () => {
3131
let underTest: NotificationRuleComponent;
3232
let fixture: ComponentFixture<NotificationRuleComponent>;
33-
let router: Router;
3433
let store: Store<AppState>;
35-
let previousRouteService: PreviousRouteService;
3634

3735
const dummyNotificationRule = NotificationRuleModelFactory.create(
3836
true,
@@ -83,8 +81,6 @@ describe('NotificationRuleComponent', () => {
8381
imports: [RouterTestingModule.withRoutes([])],
8482
declarations: [NotificationRuleComponent],
8583
}).compileComponents();
86-
previousRouteService = TestBed.inject(PreviousRouteService);
87-
router = TestBed.inject(Router);
8884
store = TestBed.inject(Store);
8985
}),
9086
);

ui/src/app/components/admin/notification-rules/notification-rules-form/notification-rules-form.component.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ describe('NotificationRulesForm', () => {
130130
it(
131131
'CreateNotificationRule() should not dispatch create notification rule when dialog is not confirmed',
132132
waitForAsync(() => {
133-
const id = 1;
134133
underTest.notificationRulesForm = { form: { valid: true } };
135134
const subject = new Subject<boolean>();
136135
const storeSpy = spyOn(store, 'dispatch');
@@ -174,7 +173,6 @@ describe('NotificationRulesForm', () => {
174173
it(
175174
'UpdateNotificationRule() should not dispatch update notification rule when dialog is not confirmed',
176175
waitForAsync(() => {
177-
const id = 1;
178176
underTest.notificationRulesForm = { form: { valid: true } };
179177
const subject = new Subject<boolean>();
180178
const storeSpy = spyOn(store, 'dispatch');

ui/src/app/components/auth/login-dialog/login-dialog.component.spec.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@
1414
*/
1515

1616
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
17-
import { provideMockStore, MockStore } from '@ngrx/store/testing';
17+
import { provideMockStore } from '@ngrx/store/testing';
1818
import { ClarityModule } from '@clr/angular';
1919
import { FormsModule } from '@angular/forms';
2020
import { LoginDialogComponent } from './login-dialog.component';
21-
import * as fromApp from '../../../stores/app.reducers';
2221

2322
describe('WelcomeComponent', () => {
2423
let component: LoginDialogComponent;
2524
let fixture: ComponentFixture<LoginDialogComponent>;
26-
let mockStore: MockStore<fromApp.AppState>;
2725
const initialAuthState = {
2826
username: 'test',
2927
isAuthenticated: false,
@@ -43,8 +41,6 @@ describe('WelcomeComponent', () => {
4341
declarations: [LoginDialogComponent],
4442
imports: [ClarityModule, FormsModule],
4543
}).compileComponents();
46-
47-
mockStore = TestBed.inject(MockStore);
4844
}),
4945
);
5046

ui/src/app/components/auth/login-dialog/login-dialog.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515

1616
import { Component, OnDestroy, OnInit } from '@angular/core';
1717
import { Store } from '@ngrx/store';
18-
import { AppState, selectAuthState } from '../../../stores/app.reducers';
18+
import { selectAuthState } from '../../../stores/app.reducers';
1919
import { Subscription } from 'rxjs';
20-
import { Router } from '@angular/router';
21-
import { absoluteRoutes } from '../../../constants/routes.constants';
2220
import * as fromApp from '../../../stores/app.reducers';
2321

2422
@Component({

0 commit comments

Comments
 (0)