Skip to content

Commit 968c233

Browse files
committed
Manual lint fixes
This can serve as an example of the type of lint issues we'd have to fix by hand in ongoing PRs if this PR were to be merged.
1 parent ca1d810 commit 968c233

6 files changed

Lines changed: 23 additions & 19 deletions

src/app/notifications/qa/events/quality-assurance-events.component.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ <h4 class="border-bottom pb-2">
1717

1818
<ds-loading class="container" *ngIf="(isEventPageLoading | async)" message="{{'quality-assurance.loading' | translate}}"></ds-loading>
1919

20-
<ds-pagination *ngIf="!(isEventPageLoading | async)"
20+
<ds-pagination *ngIf="(isEventPageLoading | async) === false"
2121
[paginationOptions]="paginationConfig"
2222
[collectionSize]="(totalElements$ | async)"
2323
[sortOptions]="paginationSortConfig"
2424
(paginationChange)="getQualityAssuranceEvents()">
2525

2626
<ng-container>
27-
<div *ngIf="(eventsUpdated$|async)?.length == 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
27+
<div *ngIf="(eventsUpdated$ | async)?.length === 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
2828
{{'quality-assurance.noEvents' | translate}}
2929
</div>
30-
<div *ngIf="(eventsUpdated$|async)?.length != 0" class="table-responsive mt-2">
30+
<div *ngIf="(eventsUpdated$ | async)?.length !== 0" class="table-responsive mt-2">
3131
<table id="events" class="table table-striped table-hover table-bordered">
3232
<thead>
3333
<tr>
3434
<th scope="col" class="trust-col">{{'quality-assurance.event.table.trust' | translate}}</th>
3535
<th scope="col" class="title-col">{{'quality-assurance.event.table.publication' | translate}}</th>
36-
<th *ngIf="hasDetailColumn() && showTopic.indexOf('/PROJECT') == -1" scope="col" class="content-col">
36+
<th *ngIf="hasDetailColumn() && showTopic.indexOf('/PROJECT') === -1" scope="col" class="content-col">
3737
{{'quality-assurance.event.table.details' | translate}}
3838
</th>
3939
<th *ngIf="hasDetailColumn() && showTopic.indexOf('/PROJECT') !== -1" scope="col" class="content-col">
@@ -126,7 +126,7 @@ <h4 class="border-bottom pb-2">
126126
>
127127
<i class="fas fa-check"></i>
128128
</button>
129-
<button *ngIf="showTopic.indexOf('/PROJECT') == -1"
129+
<button *ngIf="showTopic.indexOf('/PROJECT') === -1"
130130
class="btn btn-outline-success btn-sm button-width"
131131
ngbTooltip="{{'quality-assurance.event.action.accept' | translate}}"
132132
container="body"

src/app/notifications/qa/project-entry-import-modal/project-entry-import-modal.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ <h4>{{ (labelPrefix + label + '.select' | translate) }}</h4>
3838
</div>
3939

4040
<ds-loading *ngIf="(isLoading$ | async)" message="{{'loading.search-results' | translate}}"></ds-loading>
41-
<ds-themed-search-results *ngIf="(localEntitiesRD$ | async)?.payload?.page?.length > 0 && !(isLoading$ | async)"
41+
<ds-themed-search-results *ngIf="(localEntitiesRD$ | async)?.payload?.page?.length > 0 && (isLoading$ | async) === false"
4242
[searchResults]="(localEntitiesRD$ | async)"
4343
[sortConfig]="this.searchOptions?.sort"
4444
[searchConfig]="this.searchOptions"
@@ -53,7 +53,7 @@ <h4>{{ (labelPrefix + label + '.select' | translate) }}</h4>
5353
(selectObject)="selectEntity($event)">
5454
</ds-themed-search-results>
5555

56-
<div *ngIf="(localEntitiesRD$ | async)?.payload?.page?.length < 1 && !(isLoading$ | async)">
56+
<div *ngIf="(localEntitiesRD$ | async)?.payload?.page?.length < 1 && (isLoading$ | async) === false">
5757
<ds-alert [type]="'alert-info'">
5858
<p class="lead mb-0">{{(labelPrefix + label + '.notFound' | translate)}}</p>
5959
</ds-alert>

src/app/notifications/qa/source/quality-assurance-source.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ <h2 class="border-bottom pb-2">{{'quality-assurance.title'| translate}}</h2>
1010
<h4 class="border-bottom pb-2">{{'quality-assurance.source'| translate}}</h4>
1111

1212
<ds-loading class="container" *ngIf="(isSourceLoading() | async)" message="{{'quality-assurance.loading' | translate}}"></ds-loading>
13-
<ds-pagination *ngIf="!(isSourceLoading() | async)"
13+
<ds-pagination *ngIf="(isSourceLoading() | async) === false"
1414
[paginationOptions]="paginationConfig"
1515
[collectionSize]="(totalElements$ | async)"
1616
[hideGear]="false"
1717
[hideSortOptions]="true"
1818
(paginationChange)="getQualityAssuranceSource()">
1919

2020
<ds-loading class="container" *ngIf="(isSourceProcessing() | async)" message="'quality-assurance.loading' | translate"></ds-loading>
21-
<ng-container *ngIf="!(isSourceProcessing() | async)">
22-
<div *ngIf="(sources$|async)?.length == 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
21+
<ng-container *ngIf="(isSourceProcessing() | async) === false">
22+
<div *ngIf="(sources$ | async)?.length === 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
2323
{{'quality-assurance.noSource' | translate}}
2424
</div>
25-
<div *ngIf="(sources$|async)?.length != 0" class="table-responsive mt-2">
25+
<div *ngIf="(sources$ | async)?.length !== 0" class="table-responsive mt-2">
2626
<table id="epeople" class="table table-striped table-hover table-bordered">
2727
<thead>
2828
<tr>

src/app/notifications/qa/source/quality-assurance-source.effects.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ export class QualityAssuranceSourceEffects {
4747
map((sources: PaginatedList<QualityAssuranceSourceObject>) =>
4848
new AddSourceAction(sources.page, sources.totalPages, sources.currentPage, sources.totalElements),
4949
),
50-
catchError((error: Error) => {
51-
if (error) {
50+
catchError((error: unknown) => {
51+
if (error instanceof Error) {
5252
console.error(error.message);
53+
} else {
54+
console.error('Unexpected object thrown', error);
5355
}
5456
return observableOf(new RetrieveAllSourceErrorAction());
5557
}),

src/app/notifications/qa/topics/quality-assurance-topics.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ <h2 class="border-bottom pb-2">{{'quality-assurance.title'| translate}}</h2>
1010
<h4 class="border-bottom pb-2">{{'quality-assurance.topics'| translate}}</h4>
1111

1212
<ds-loading class="container" *ngIf="(isTopicsLoading() | async)" message="{{'quality-assurance.loading' | translate}}"></ds-loading>
13-
<ds-pagination *ngIf="!(isTopicsLoading() | async)"
13+
<ds-pagination *ngIf="(isTopicsLoading() | async) === false"
1414
[paginationOptions]="paginationConfig"
1515
[collectionSize]="(totalElements$ | async)"
1616
[hideGear]="false"
1717
[hideSortOptions]="true"
1818
(paginationChange)="getQualityAssuranceTopics()">
1919

2020
<ds-loading class="container" *ngIf="(isTopicsProcessing() | async)" message="'quality-assurance.loading' | translate"></ds-loading>
21-
<ng-container *ngIf="!(isTopicsProcessing() | async)">
22-
<div *ngIf="(topics$|async)?.length == 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
21+
<ng-container *ngIf="(isTopicsProcessing() | async) === false">
22+
<div *ngIf="(topics$ | async)?.length === 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
2323
{{'quality-assurance.noTopics' | translate}}
2424
</div>
25-
<div *ngIf="(topics$|async)?.length != 0" class="table-responsive mt-2">
25+
<div *ngIf="(topics$ | async)?.length !== 0" class="table-responsive mt-2">
2626
<table id="epeople" class="table table-striped table-hover table-bordered">
2727
<thead>
2828
<tr>

src/app/notifications/qa/topics/quality-assurance-topics.effects.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ export class QualityAssuranceTopicsEffects {
4747
map((topics: PaginatedList<QualityAssuranceTopicObject>) =>
4848
new AddTopicsAction(topics.page, topics.totalPages, topics.currentPage, topics.totalElements),
4949
),
50-
catchError((error: Error) => {
51-
if (error) {
50+
catchError((error: unknown) => {
51+
if (error instanceof Error) {
5252
console.error(error.message);
53+
} else {
54+
console.error('Unexpected object thrown', error);
5355
}
5456
return observableOf(new RetrieveAllTopicsErrorAction());
5557
}),

0 commit comments

Comments
 (0)