From a708e78484100c26086da094bd653abad7a0cacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Mon, 7 Oct 2024 09:55:44 +0200 Subject: [PATCH] lint fix --- dev/ts/pages/diagram-navigation.ts | 2 +- dev/ts/pages/overlays.ts | 2 +- dev/ts/shared/internal-helpers.ts | 2 +- dev/ts/shared/main.ts | 4 ++-- src/component/mxgraph/initializer.ts | 8 ++++---- src/component/mxgraph/shape/render/index.ts | 2 +- src/component/registry/index.ts | 2 +- src/model/bpmn/json/baseElement/baseElement.ts | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dev/ts/pages/diagram-navigation.ts b/dev/ts/pages/diagram-navigation.ts index f73a393e0b..2049a7a132 100644 --- a/dev/ts/pages/diagram-navigation.ts +++ b/dev/ts/pages/diagram-navigation.ts @@ -42,7 +42,7 @@ function configureZoomDebounceInput(parameters: URLSearchParams): HTMLInputEleme } function start(): void { - const parameters = new URLSearchParams(window.location.search); + const parameters = new URLSearchParams(globalThis.location.search); configureMousePointer(parameters); configureControlsPanel(parameters); diff --git a/dev/ts/pages/overlays.ts b/dev/ts/pages/overlays.ts index fded720e87..d40a76e274 100644 --- a/dev/ts/pages/overlays.ts +++ b/dev/ts/pages/overlays.ts @@ -66,7 +66,7 @@ function configureRemoveAllOverlays(): void { } function start(): void { - const parameters = new URLSearchParams(window.location.search); + const parameters = new URLSearchParams(globalThis.location.search); configureMousePointer(parameters); configureControlsPanel(parameters); diff --git a/dev/ts/shared/internal-helpers.ts b/dev/ts/shared/internal-helpers.ts index 3e4b209402..3c5cbb7c08 100644 --- a/dev/ts/shared/internal-helpers.ts +++ b/dev/ts/shared/internal-helpers.ts @@ -27,7 +27,7 @@ export function logStartup(message?: string, ...optionalParameters: unknown[]): export function logErrorAndOpenAlert(error: string, alertMessage?: string): void { logError(error); - window.alert(alertMessage ?? error); + globalThis.alert(alertMessage ?? error); } export function logError(error: string): void { diff --git a/dev/ts/shared/main.ts b/dev/ts/shared/main.ts index 753a540064..98d7d159ff 100644 --- a/dev/ts/shared/main.ts +++ b/dev/ts/shared/main.ts @@ -309,7 +309,7 @@ export function startBpmnVisualization(config: BpmnVisualizationDemoConfiguratio const log = logStartup; log(`Initializing BpmnVisualization with container:`, config.globalOptions.container); - const parameters = new URLSearchParams(window.location.search); + const parameters = new URLSearchParams(globalThis.location.search); const rendererIgnoreBpmnColors = parameters.get('renderer.ignore.bpmn.colors'); if (rendererIgnoreBpmnColors) { const ignoreBpmnColors = rendererIgnoreBpmnColors === 'true'; @@ -320,7 +320,7 @@ export function startBpmnVisualization(config: BpmnVisualizationDemoConfiguratio bpmnVisualization = new ThemedBpmnVisualization(config.globalOptions); log('Initialization completed'); - new DropFileUserInterface(window, 'drop-container', bpmnVisualization.graph.container, readAndLoadFile); + new DropFileUserInterface(globalThis, 'drop-container', bpmnVisualization.graph.container, readAndLoadFile); log('Drag&Drop support initialized'); statusKoNotifier = config.statusKoNotifier ?? logOnlyStatusKoNotifier; diff --git a/src/component/mxgraph/initializer.ts b/src/component/mxgraph/initializer.ts index bbecd222da..d3bd611654 100644 --- a/src/component/mxgraph/initializer.ts +++ b/src/component/mxgraph/initializer.ts @@ -68,11 +68,11 @@ declare global { function initialize(): mxGraphExportObject { // set options globally, as it is not working when passing options to the factory (https://github.com/jgraph/mxgraph/issues/479) // Required otherwise 'Uncaught ReferenceError: assignment to undeclared variable mx...' - window.mxForceIncludes = false; - window.mxLoadResources = false; + globalThis.mxForceIncludes = false; + globalThis.mxLoadResources = false; // Required otherwise we got 'Uncaught ReferenceError: assignment to undeclared variable mx...' - window.mxLoadStylesheets = false; - window.mxResourceExtension = '.txt'; + globalThis.mxLoadStylesheets = false; + globalThis.mxResourceExtension = '.txt'; return factory({}); } diff --git a/src/component/mxgraph/shape/render/index.ts b/src/component/mxgraph/shape/render/index.ts index 816e1e1ecd..1b84e1a8cf 100644 --- a/src/component/mxgraph/shape/render/index.ts +++ b/src/component/mxgraph/shape/render/index.ts @@ -15,6 +15,6 @@ limitations under the License. */ // export types first, otherwise typedoc doesn't generate the subsequent doc correctly (no category and uses the file header instead of the actual TSDoc) -export * from './render-types'; +export type * from './render-types'; export { BpmnCanvas, type BpmnCanvasConfiguration } from './BpmnCanvas'; export { IconPainter, IconPainterProvider, type PaintParameter } from './icon-painter'; diff --git a/src/component/registry/index.ts b/src/component/registry/index.ts index f2ccc1f359..1e9b33041f 100644 --- a/src/component/registry/index.ts +++ b/src/component/registry/index.ts @@ -15,5 +15,5 @@ limitations under the License. */ // export types first, otherwise typedoc doesn't generate the subsequent doc correctly (no category and uses the file header instead of the actual TSDoc) -export * from './types'; +export type * from './types'; export { BpmnElementsRegistry } from './bpmn-elements-registry'; diff --git a/src/model/bpmn/json/baseElement/baseElement.ts b/src/model/bpmn/json/baseElement/baseElement.ts index dfaab799a0..15220c6f63 100644 --- a/src/model/bpmn/json/baseElement/baseElement.ts +++ b/src/model/bpmn/json/baseElement/baseElement.ts @@ -16,8 +16,8 @@ limitations under the License. import type { TDataState } from './data'; import type { TExpression, TFormalExpression } from './expression'; -import type { TImplicitThrowEvent } from './flowNode/event'; import type { TDocumentation, TExtensionElements } from '../Semantic'; +import type { TImplicitThrowEvent } from './flowNode/event'; // abstract="true" //