From 0da6a2bec71873c35b51a508fe05a5fe02ac5ec1 Mon Sep 17 00:00:00 2001 From: martinRenou Date: Wed, 16 Oct 2024 16:30:30 +0200 Subject: [PATCH] Linting --- packages/voila/src/plugins/outputs/plugins.ts | 2 +- packages/widgets_manager7/src/index.ts | 16 +++++++++++----- packages/widgets_manager7/src/manager.ts | 6 +----- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/voila/src/plugins/outputs/plugins.ts b/packages/voila/src/plugins/outputs/plugins.ts index 6fa358057..7134122b5 100644 --- a/packages/voila/src/plugins/outputs/plugins.ts +++ b/packages/voila/src/plugins/outputs/plugins.ts @@ -86,7 +86,7 @@ export const renderOutputsPlugin: JupyterFrontEndPlugin = { const cells = new RenderedCells({ node }); app.shell.add(cells, 'main'); } - }) + }); } }; diff --git a/packages/widgets_manager7/src/index.ts b/packages/widgets_manager7/src/index.ts index ddf01a001..2c6a45707 100644 --- a/packages/widgets_manager7/src/index.ts +++ b/packages/widgets_manager7/src/index.ts @@ -35,8 +35,10 @@ import { VoilaWidgetManager } from './manager'; const WIDGET_MIMETYPE = 'application/vnd.jupyter.widget-view+json'; class VoilaWidgetRenderer extends WidgetRenderer { - - constructor(options: IRenderMime.IRendererOptions, manager: VoilaWidgetManager) { + constructor( + options: IRenderMime.IRendererOptions, + manager: VoilaWidgetManager + ) { super(options, manager); this.voilaManager = manager; @@ -49,8 +51,7 @@ class VoilaWidgetRenderer extends WidgetRenderer { } private voilaManager: VoilaWidgetManager; - -}; +} /** * The Voila widgets manager plugin. @@ -88,20 +89,25 @@ const widgetManager: JupyterFrontEndPlugin = { session: { kernel, kernelChanged: { + // eslint-disable-next-line @typescript-eslint/no-empty-function connect: () => {} } }, statusChanged: { + // eslint-disable-next-line @typescript-eslint/no-empty-function connect: () => {} }, kernelChanged: { + // eslint-disable-next-line @typescript-eslint/no-empty-function connect: () => {} }, connectionStatusChanged: { + // eslint-disable-next-line @typescript-eslint/no-empty-function connect: () => {} } }, saveState: { + // eslint-disable-next-line @typescript-eslint/no-empty-function connect: () => {} } }; @@ -162,7 +168,7 @@ const widgetManager: JupyterFrontEndPlugin = { } }); - app.started.then(async() => { + app.started.then(async () => { await manager._loadFromKernel(); }); diff --git a/packages/widgets_manager7/src/manager.ts b/packages/widgets_manager7/src/manager.ts index d0ea77258..0d282e00d 100644 --- a/packages/widgets_manager7/src/manager.ts +++ b/packages/widgets_manager7/src/manager.ts @@ -6,7 +6,6 @@ import { INotebookModel } from '@jupyterlab/notebook'; import { Widget } from '@lumino/widgets'; import { MessageLoop } from '@lumino/messaging'; - export class VoilaWidgetManager extends WidgetManager { register_model(model_id: string, modelPromise: Promise): void { super.register_model(model_id, modelPromise); @@ -43,10 +42,7 @@ export class VoilaWidgetManager extends WidgetManager { if (view.el) { view.el.setAttribute('data-voila-jupyter-widget', ''); view.el.addEventListener('jupyterWidgetResize', (e: Event) => { - MessageLoop.postMessage( - view.pWidget, - Widget.ResizeMessage.UnknownSize - ); + MessageLoop.postMessage(view.pWidget, Widget.ResizeMessage.UnknownSize); }); } return view.pWidget;