Use eslint&prettier for code linting&formatting

This commit is contained in:
Francesco Stasi
2021-06-16 15:08:48 +02:00
committed by Francesco Stasi
parent 2a3873a923
commit 0592199858
173 changed files with 8963 additions and 3841 deletions

View File

@@ -8,7 +8,6 @@ import { SketchesService, Sketch } from '../../../common/protocol';
@injectable()
export class EditorWidgetFactory extends TheiaEditorWidgetFactory {
@inject(SketchesService)
protected readonly sketchesService: SketchesService;
@@ -23,16 +22,19 @@ export class EditorWidgetFactory extends TheiaEditorWidgetFactory {
return this.maybeUpdateCaption(widget);
}
protected async maybeUpdateCaption(widget: EditorWidget): Promise<EditorWidget> {
protected async maybeUpdateCaption(
widget: EditorWidget
): Promise<EditorWidget> {
const sketch = await this.sketchesServiceClient.currentSketch();
const { uri } = widget.editor;
if (sketch && Sketch.isInSketch(uri, sketch)) {
const isTemp = await this.sketchesService.isTemp(sketch);
if (isTemp) {
widget.title.caption = `Unsaved ${this.labelProvider.getName(uri)}`;
widget.title.caption = `Unsaved ${this.labelProvider.getName(
uri
)}`;
}
}
return widget;
}
}