Skip to content

Commit 1c1f307

Browse files
committed
[DSC-2256] Fix lint
1 parent 6d0a6e8 commit 1c1f307

263 files changed

Lines changed: 816 additions & 702 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/app/access-control/epeople-registry/epeople-registry.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ import {
5959
} from '../../shared/testing/eperson.mock';
6060
import { NotificationsServiceStub } from '../../shared/testing/notifications-service.stub';
6161
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub';
62+
import { TranslateLoaderMock } from '../../shared/testing/translate-loader.mock';
6263
import { EPeopleRegistryComponent } from './epeople-registry.component';
6364
import { EPersonFormComponent } from './eperson-form/eperson-form.component';
64-
import { TranslateLoaderMock } from '../../shared/testing/translate-loader.mock';
6565

6666
describe('EPeopleRegistryComponent', () => {
6767
let component: EPeopleRegistryComponent;

src/app/admin/admin-edit-user-agreement/admin-edit-user-agreement.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ import { NotificationsService } from '../../shared/notifications/notifications.s
3232
templateUrl: './admin-edit-user-agreement.component.html',
3333
imports: [
3434
AlertComponent,
35-
TranslateModule,
36-
KeyValuePipe,
3735
FormsModule,
36+
KeyValuePipe,
3837
NgForOf,
38+
TranslateModule,
3939
],
4040
standalone: true,
4141
})

src/app/admin/admin-import-batch-page/batch-import-page.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ import { FileDropzoneNoUploaderComponent } from '../../shared/upload/file-dropzo
3939
imports: [
4040
FileDropzoneNoUploaderComponent,
4141
FormsModule,
42-
TranslateModule,
4342
SwitchComponent,
43+
TranslateModule,
4444
],
4545
standalone: true,
4646
})

src/app/admin/edit-cms-metadata/edit-cms-metadata.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ import { NotificationsService } from '../../shared/notifications/notifications.s
3131
templateUrl: './edit-cms-metadata.component.html',
3232
styleUrls: ['./edit-cms-metadata.component.scss'],
3333
imports: [
34+
AsyncPipe,
35+
BtnDisabledDirective,
3436
FormsModule,
3537
NgForOf,
36-
TranslateModule,
37-
AsyncPipe,
3838
NgIf,
3939
NgTemplateOutlet,
40-
BtnDisabledDirective,
40+
TranslateModule,
4141
],
4242
standalone: true,
4343
})

src/app/app.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {
22
AsyncPipe,
33
DOCUMENT,
44
isPlatformBrowser,
5-
NgIf,
65
} from '@angular/common';
76
import {
87
AfterViewInit,

src/app/audit-page/detail/audit-detail.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ import { VarDirective } from '../../shared/utils/var.directive';
3333
templateUrl: './audit-detail.component.html',
3434
changeDetection: ChangeDetectionStrategy.OnPush,
3535
imports: [
36-
NgIf,
3736
AsyncPipe,
38-
TranslateModule,
39-
VarDirective,
4037
DatePipe,
38+
NgIf,
4139
RouterLink,
40+
TranslateModule,
41+
VarDirective,
4242
],
4343
standalone: true,
4444
})

src/app/audit-page/object-audit-overview/object-audit-overview.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ import { VarDirective } from '../../shared/utils/var.directive';
5555
selector: 'ds-object-audit-overview',
5656
templateUrl: './object-audit-overview.component.html',
5757
imports: [
58-
PaginationComponent,
59-
NgIf,
6058
AsyncPipe,
61-
TranslateModule,
59+
DatePipe,
6260
NgForOf,
63-
VarDirective,
61+
NgIf,
62+
PaginationComponent,
6463
RouterLink,
65-
DatePipe,
64+
TranslateModule,
65+
VarDirective,
6666
],
6767
standalone: true,
6868
})

src/app/audit-page/overview/audit-overview.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ import { VarDirective } from '../../shared/utils/var.directive';
3636
selector: 'ds-audit-overview',
3737
templateUrl: './audit-overview.component.html',
3838
imports: [
39-
PaginationComponent,
40-
NgIf,
4139
AsyncPipe,
42-
TranslateModule,
43-
RouterLink,
40+
DatePipe,
4441
NgForOf,
42+
NgIf,
43+
PaginationComponent,
44+
RouterLink,
45+
TranslateModule,
4546
VarDirective,
46-
DatePipe,
4747
],
4848
standalone: true,
4949
})

src/app/bitstream-page/bitstream-download-page/bitstream-download-page.component.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,15 @@ import {
66
import {
77
Component,
88
Inject,
9-
inject,
109
OnInit,
1110
PLATFORM_ID,
1211
} from '@angular/core';
1312
import {
1413
ActivatedRoute,
15-
Params,
1614
Router,
1715
} from '@angular/router';
1816
import { TranslateModule } from '@ngx-translate/core';
19-
import {
20-
Observable,
21-
of,
22-
} from 'rxjs';
17+
import { Observable } from 'rxjs';
2318
import {
2419
map,
2520
startWith,
@@ -36,7 +31,6 @@ import {
3631
NativeWindowService,
3732
} from '../../core/services/window.service';
3833
import { Bitstream } from '../../core/shared/bitstream.model';
39-
import { FileService } from '../../core/shared/file.service';
4034
import { getRemoteDataPayload } from '../../core/shared/operators';
4135
import { isNotEmpty } from '../../shared/empty.util';
4236

src/app/bitstream-page/bitstream-download-redirect.guard.spec.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
} from '@angular/core/testing';
66
import { Router } from '@angular/router';
77
import { Store } from '@ngrx/store';
8-
import { of as observableOf } from 'rxjs';
8+
import { of } from 'rxjs';
99

1010
import { getForbiddenRoute } from '../app-routing-paths';
1111
import { AuthService } from '../core/auth/auth.service';
@@ -68,27 +68,27 @@ describe('BitstreamDownloadRedirectGuard', () => {
6868

6969
function init() {
7070
authService = jasmine.createSpyObj('authService', {
71-
isAuthenticated: observableOf(true),
71+
isAuthenticated: of(true),
7272
setRedirectUrl: {},
7373
});
7474
authorizationService = jasmine.createSpyObj('authorizationSerivice', {
75-
isAuthorized: observableOf(true),
75+
isAuthorized: of(true),
7676
});
7777

7878
fileService = jasmine.createSpyObj('fileService', {
79-
retrieveFileDownloadLink: observableOf('content-url-with-headers'),
79+
retrieveFileDownloadLink: of('content-url-with-headers'),
8080
});
8181

8282
hardRedirectService = jasmine.createSpyObj('fileService', {
8383
redirect: {},
8484
});
8585

8686
halEndpointService = jasmine.createSpyObj('halEndpointService', {
87-
getEndpoint: observableOf('https://rest.api/core'),
87+
getEndpoint: of('https://rest.api/core'),
8888
});
8989

9090
remoteDataBuildService = jasmine.createSpyObj('remoteDataBuildService', {
91-
buildSingle: observableOf(new Bitstream()),
91+
buildSingle: of(new Bitstream()),
9292
});
9393

9494
uuidService = jasmine.createSpyObj('uuidService', {
@@ -107,19 +107,19 @@ describe('BitstreamDownloadRedirectGuard', () => {
107107

108108
store = jasmine.createSpyObj('store', {
109109
dispatch: {},
110-
pipe: observableOf(true),
110+
pipe: of(true),
111111
});
112112

113113
serverResponseService = jasmine.createSpyObj('ServerResponseService', {
114114
setHeader: jasmine.createSpy('setHeader'),
115115
});
116116

117117
signpostingDataService = jasmine.createSpyObj('SignpostingDataService', {
118-
getLinks: observableOf([mocklink, mocklink2]),
118+
getLinks: of([mocklink, mocklink2]),
119119
});
120120

121121
objectCacheService = jasmine.createSpyObj('objectCacheService', {
122-
getByHref: observableOf(null),
122+
getByHref: of(null),
123123
});
124124

125125
bitstreamDataService = jasmine.createSpyObj('bitstreamDataService', {
@@ -163,7 +163,7 @@ describe('BitstreamDownloadRedirectGuard', () => {
163163
describe('when the user is authorized and not logged in', () => {
164164
beforeEach(() => {
165165
init();
166-
(authService.isAuthenticated as jasmine.Spy).and.returnValue(observableOf(false));
166+
(authService.isAuthenticated as jasmine.Spy).and.returnValue(of(false));
167167
initTestbed();
168168
});
169169
it('should redirect to the content link', waitForAsync(() => {
@@ -191,7 +191,7 @@ describe('BitstreamDownloadRedirectGuard', () => {
191191
describe('when the user is not authorized and logged in', () => {
192192
beforeEach(() => {
193193
init();
194-
(authorizationService.isAuthorized as jasmine.Spy).and.returnValue(observableOf(false));
194+
(authorizationService.isAuthorized as jasmine.Spy).and.returnValue(of(false));
195195
initTestbed();
196196
});
197197
it('should navigate to the forbidden route', waitForAsync(() => {
@@ -205,8 +205,8 @@ describe('BitstreamDownloadRedirectGuard', () => {
205205
describe('when the user is not authorized and not logged in', () => {
206206
beforeEach(() => {
207207
init();
208-
(authService.isAuthenticated as jasmine.Spy).and.returnValue(observableOf(false));
209-
(authorizationService.isAuthorized as jasmine.Spy).and.returnValue(observableOf(false));
208+
(authService.isAuthenticated as jasmine.Spy).and.returnValue(of(false));
209+
(authorizationService.isAuthorized as jasmine.Spy).and.returnValue(of(false));
210210
initTestbed();
211211
});
212212
it('should navigate to the login page', waitForAsync(() => {

0 commit comments

Comments
 (0)