chore(prettier): full repo linting and code reformatting once and for all (#3627)

This commit is contained in:
Alireza authored and GitHub committed 2023-09-01 16:19:39 -04:00
1 parent 01500a2d4c
commit 9045ddaedc
656 files changed
+21737 -20628

No files matched your search

@@ -1,8 +1,4 @@
import {
synchronizers,
SynchronizerManager,
Synchronizer,
} from '@cornerstonejs/tools';
import { synchronizers, SynchronizerManager, Synchronizer } from '@cornerstonejs/tools';
import { pubSubServiceInterface, Types, ServicesManager } from '@ohif/core';
@@ -14,10 +10,7 @@ const EVENTS = {
* @params options - are an optional set of options associated with the first
* sync group declared.
*/
export type SyncCreator = (
id: string,
options?: Record<string, unknown>
) => Synchronizer;
export type SyncCreator = (id: string, options?: Record<string, unknown>) => Synchronizer;
export type SyncGroup = {
type: string;
@@ -40,9 +33,7 @@ export default class SyncGroupService {
static REGISTRATION = {
name: 'syncGroupService',
altName: 'SyncGroupService',
create: ({
servicesManager,
}: Types.Extensions.ExtensionParams): SyncGroupService => {
create: ({ servicesManager }: Types.Extensions.ExtensionParams): SyncGroupService => {
return new SyncGroupService(servicesManager);
},
};
@@ -65,11 +56,7 @@ export default class SyncGroupService {
Object.assign(this, pubSubServiceInterface);
}
private _createSynchronizer(
type: string,
id: string,
options
): Synchronizer | undefined {
private _createSynchronizer(type: string, id: string, options): Synchronizer | undefined {
const syncCreator = this.synchronizerCreators[type.toLowerCase()];
if (syncCreator) {
return syncCreator(id, options);
@@ -109,19 +96,11 @@ export default class SyncGroupService {
return;
}
const syncGroupsArray = Array.isArray(syncGroups)
? syncGroups
: [syncGroups];
const syncGroupsArray = Array.isArray(syncGroups) ? syncGroups : [syncGroups];
syncGroupsArray.forEach(syncGroup => {
const syncGroupObj = asSyncGroup(syncGroup);
const {
type,
target = true,
source = true,
options = {},
id = type,
} = syncGroupObj;
const { type, target = true, source = true, options = {}, id = type } = syncGroupObj;
const synchronizer = this._getOrCreateSynchronizer(type, id, options);
synchronizer.setOptions(viewportId, options);