ESLint: fix no-case-declaration violations

This commit is contained in:
Yury Bondarenko
2023-05-08 16:51:45 +02:00
parent f1a8920d86
commit 0f1ebfba62
3 changed files with 7 additions and 6 deletions

View File

@@ -57,7 +57,7 @@ export class SubmissionObjectDataService {
return this.workspaceitemDataService.findById(id, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
case SubmissionScopeType.WorkflowItem:
return this.workflowItemDataService.findById(id, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
default:
default: {
const now = new Date().getTime();
return observableOf(new RemoteData(
now,
@@ -68,6 +68,7 @@ export class SubmissionObjectDataService {
undefined,
400
));
}
}
}
}

View File

@@ -133,9 +133,7 @@ export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type<
return (model instanceof DynamicListCheckboxGroupModel) ? DsDynamicListComponent : DynamicNGBootstrapCheckboxGroupComponent;
case DYNAMIC_FORM_CONTROL_TYPE_DATEPICKER:
const datepickerModel = model as DynamicDatePickerModel;
return datepickerModel.inline ? DynamicNGBootstrapCalendarComponent : DsDatePickerInlineComponent;
return (model as DynamicDatePickerModel).inline ? DynamicNGBootstrapCalendarComponent : DsDatePickerInlineComponent;
case DYNAMIC_FORM_CONTROL_TYPE_GROUP:
return DsDynamicFormGroupComponent;

View File

@@ -51,10 +51,11 @@ export class AuthRequestServiceStub {
public getRequest(method: string, options?: HttpOptions): Observable<any> {
const authStatusStub: AuthStatus = new AuthStatus();
switch (method) {
case 'logout':
case 'logout': {
authStatusStub.authenticated = false;
break;
case 'status':
}
case 'status': {
const token = ((options.headers as any).lazyUpdate[1]) ? (options.headers as any).lazyUpdate[1].value : null;
if (this.validateToken(token)) {
authStatusStub.authenticated = true;
@@ -74,6 +75,7 @@ export class AuthRequestServiceStub {
authStatusStub.authenticated = false;
}
break;
}
}
return createSuccessfulRemoteDataObject$(authStatusStub);
}