Skip to content

Commit d87b375

Browse files
AAwoutersybnd
authored andcommitted
120243: Fix lint issues after upgrade
1 parent ae32581 commit d87b375

28 files changed

Lines changed: 293 additions & 130 deletions

src/app/admin/admin-reports/filtered-collections/filtered-collections.component.spec.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import {
2+
provideHttpClient,
3+
withInterceptorsFromDi,
4+
} from '@angular/common/http';
15
import { provideHttpClientTesting } from '@angular/common/http/testing';
26
import { NO_ERRORS_SCHEMA } from '@angular/core';
37
import {
@@ -20,7 +24,6 @@ import { RawRestResponse } from 'src/app/core/dspace-rest/raw-rest-response.mode
2024
import { TranslateLoaderMock } from 'src/app/shared/mocks/translate-loader.mock';
2125

2226
import { FilteredCollectionsComponent } from './filtered-collections.component';
23-
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
2427

2528
describe('FiltersComponent', () => {
2629
let component: FilteredCollectionsComponent;
@@ -40,22 +43,22 @@ describe('FiltersComponent', () => {
4043

4144
beforeEach(waitForAsync(() => {
4245
TestBed.configureTestingModule({
43-
schemas: [NO_ERRORS_SCHEMA],
44-
imports: [NgbAccordionModule,
46+
schemas: [NO_ERRORS_SCHEMA],
47+
imports: [NgbAccordionModule,
4548
TranslateModule.forRoot({
46-
loader: {
47-
provide: TranslateLoader,
48-
useClass: TranslateLoaderMock,
49-
},
49+
loader: {
50+
provide: TranslateLoader,
51+
useClass: TranslateLoaderMock,
52+
},
5053
}),
5154
FilteredCollectionsComponent],
52-
providers: [
55+
providers: [
5356
FormBuilder,
5457
DspaceRestService,
5558
provideHttpClient(withInterceptorsFromDi()),
5659
provideHttpClientTesting(),
57-
]
58-
});
60+
],
61+
});
5962
}));
6063

6164
beforeEach(waitForAsync(() => {

src/app/core/auth/auth.interceptor.spec.ts

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
2-
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
1+
import {
2+
HTTP_INTERCEPTORS,
3+
provideHttpClient,
4+
withInterceptorsFromDi,
5+
} from '@angular/common/http';
6+
import {
7+
HttpTestingController,
8+
provideHttpClientTesting,
9+
} from '@angular/common/http/testing';
310
import { TestBed } from '@angular/core/testing';
411
import { Router } from '@angular/router';
512
import { Store } from '@ngrx/store';
@@ -25,21 +32,21 @@ describe(`AuthInterceptor`, () => {
2532

2633
beforeEach(() => {
2734
TestBed.configureTestingModule({
28-
imports: [],
29-
providers: [
35+
imports: [],
36+
providers: [
3037
DspaceRestService,
3138
{ provide: AuthService, useValue: authServiceStub },
3239
{ provide: Router, useClass: RouterStub },
3340
{
34-
provide: HTTP_INTERCEPTORS,
35-
useClass: AuthInterceptor,
36-
multi: true,
41+
provide: HTTP_INTERCEPTORS,
42+
useClass: AuthInterceptor,
43+
multi: true,
3744
},
3845
{ provide: Store, useValue: store },
3946
provideHttpClient(withInterceptorsFromDi()),
4047
provideHttpClientTesting(),
41-
]
42-
});
48+
],
49+
});
4350

4451
service = TestBed.inject(DspaceRestService);
4552
httpMock = TestBed.inject(HttpTestingController);

src/app/core/auth/auth.interceptor.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
import { HttpErrorResponse, HttpEvent, HttpHandler, HttpHeaders, HttpInterceptor, HttpRequest, HttpResponse, HttpResponseBase } from '@angular/common/http';
1+
import {
2+
HttpErrorResponse,
3+
HttpEvent,
4+
HttpHandler,
5+
HttpHeaders,
6+
HttpInterceptor,
7+
HttpRequest,
8+
HttpResponse,
9+
HttpResponseBase,
10+
} from '@angular/common/http';
211
import {
312
Injectable,
413
Injector,

src/app/core/auth/server-auth-request.service.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http';
1+
import {
2+
HttpClient,
3+
HttpHeaders,
4+
HttpResponse,
5+
} from '@angular/common/http';
26
import {
37
Observable,
48
of as observableOf,

src/app/core/auth/server-auth-request.service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http';
1+
import {
2+
HttpClient,
3+
HttpHeaders,
4+
HttpResponse,
5+
} from '@angular/common/http';
26
import { Injectable } from '@angular/core';
37
import { Observable } from 'rxjs';
48
import { map } from 'rxjs/operators';

src/app/core/data/eperson-registration.service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { HttpHeaders, HttpParams } from '@angular/common/http';
1+
import {
2+
HttpHeaders,
3+
HttpParams,
4+
} from '@angular/common/http';
25
import { Injectable } from '@angular/core';
36
import { Observable } from 'rxjs';
47
import {

src/app/core/data/identifier-data.service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
1+
import {
2+
HttpClient,
3+
HttpHeaders,
4+
HttpParams,
5+
} from '@angular/common/http';
26
import { Injectable } from '@angular/core';
37
import { Store } from '@ngrx/store';
48
import { Observable } from 'rxjs';

src/app/core/dspace-rest/dspace-rest.service.spec.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
import { HttpErrorResponse, HttpHeaders, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
2-
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
1+
import {
2+
HttpErrorResponse,
3+
HttpHeaders,
4+
provideHttpClient,
5+
withInterceptorsFromDi,
6+
} from '@angular/common/http';
7+
import {
8+
HttpTestingController,
9+
provideHttpClientTesting,
10+
} from '@angular/common/http/testing';
311
import {
412
inject,
513
TestBed,
@@ -27,9 +35,13 @@ describe('DspaceRestService', () => {
2735

2836
beforeEach(() => {
2937
TestBed.configureTestingModule({
30-
imports: [],
31-
providers: [DspaceRestService, provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
32-
});
38+
imports: [],
39+
providers: [
40+
DspaceRestService,
41+
provideHttpClient(withInterceptorsFromDi()),
42+
provideHttpClientTesting(),
43+
],
44+
});
3345

3446
dspaceRestService = TestBed.inject(DspaceRestService);
3547
httpMock = TestBed.inject(HttpTestingController);

src/app/core/dspace-rest/dspace-rest.service.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { HttpClient, HttpErrorResponse, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
1+
import {
2+
HttpClient,
3+
HttpErrorResponse,
4+
HttpHeaders,
5+
HttpParams,
6+
HttpResponse,
7+
} from '@angular/common/http';
28
import { Injectable } from '@angular/core';
39
import {
410
Observable,

src/app/core/forward-client-ip/forward-client-ip.interceptor.spec.ts

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
2-
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
1+
import {
2+
HTTP_INTERCEPTORS,
3+
provideHttpClient,
4+
withInterceptorsFromDi,
5+
} from '@angular/common/http';
6+
import {
7+
HttpTestingController,
8+
provideHttpClientTesting,
9+
} from '@angular/common/http/testing';
310
import { TestBed } from '@angular/core/testing';
411

512
import { REQUEST } from '../../../express.tokens';
@@ -18,19 +25,19 @@ describe('ForwardClientIpInterceptor', () => {
1825
clientIp = '1.2.3.4';
1926

2027
TestBed.configureTestingModule({
21-
imports: [],
22-
providers: [
28+
imports: [],
29+
providers: [
2330
DspaceRestService,
2431
{
25-
provide: HTTP_INTERCEPTORS,
26-
useClass: ForwardClientIpInterceptor,
27-
multi: true,
32+
provide: HTTP_INTERCEPTORS,
33+
useClass: ForwardClientIpInterceptor,
34+
multi: true,
2835
},
2936
{ provide: REQUEST, useValue: { get: () => undefined, connection: { remoteAddress: clientIp } } },
3037
provideHttpClient(withInterceptorsFromDi()),
3138
provideHttpClientTesting(),
32-
]
33-
});
39+
],
40+
});
3441

3542
service = TestBed.inject(DspaceRestService);
3643
httpMock = TestBed.inject(HttpTestingController);

0 commit comments

Comments
 (0)