From 4be3e389628114bd2de4dd49932ee3e793b9f181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Thu, 7 Sep 2023 01:17:00 +0000 Subject: [PATCH 1/2] add "prettier" formatter --- ui/.devcontainer/devcontainer.json | 1 + ui/.vscode/settings.json | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/.devcontainer/devcontainer.json b/ui/.devcontainer/devcontainer.json index 0c9e5d0..4112a8d 100644 --- a/ui/.devcontainer/devcontainer.json +++ b/ui/.devcontainer/devcontainer.json @@ -22,6 +22,7 @@ // Add the IDs of extensions you want installed when the container is created. "extensions": [ "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", "mhutchie.git-graph", "Syler.sass-indented", "Vue.volar" diff --git a/ui/.vscode/settings.json b/ui/.vscode/settings.json index 6c1800c..c6c940c 100644 --- a/ui/.vscode/settings.json +++ b/ui/.vscode/settings.json @@ -1,5 +1,14 @@ { "editor.formatOnSave": true, + "[vue]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, "editor.codeActionsOnSave": { "source.organizeImports": true }, @@ -7,5 +16,6 @@ "editor.tabSize": 2, "sass.disableAutoIndent": true, "sass.format.convert": false, - "sass.format.deleteWhitespace": true + "sass.format.deleteWhitespace": true, + "prettier.trailingComma": "all", } \ No newline at end of file From 40284c406185ce58038d443b663ba85c165a6183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Thu, 7 Sep 2023 01:17:14 +0000 Subject: [PATCH 2/2] apply "prettier" styling --- ui/src/App.vue | 2 +- ui/src/components/BulmaBreadcrumbs.vue | 10 ++++-- ui/src/components/Calendar.vue | 14 +++++--- ui/src/components/CalendarDoor.vue | 14 +++----- ui/src/components/door_map/DoorChooser.vue | 10 ++++-- ui/src/components/door_map/DoorPlacer.vue | 11 +++++-- ui/src/components/door_map/PreviewDoor.vue | 33 ++++++++++++++----- .../components/door_map/RectangleCanvas.vue | 19 ++++++++--- ui/src/components/door_map/calendar.ts | 4 +-- ui/src/components/rects/SVGRect.vue | 11 +++++-- ui/src/components/rects/ThouCanvas.vue | 19 ++++++++--- ui/src/components/rects/rectangles.ts | 23 ++++++------- ui/src/d.ts/shims-advent22.d.ts | 2 +- ui/src/d.ts/shims-vue.d.ts | 8 ++--- ui/src/main.ts | 18 +++++----- ui/src/plugins/advent22.ts | 26 ++++++++------- ui/src/plugins/fontawesome.ts | 16 ++++----- 17 files changed, 147 insertions(+), 93 deletions(-) diff --git a/ui/src/App.vue b/ui/src/App.vue index 69b3bab..aefb128 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -51,7 +51,7 @@ export default class extends Vue { "days/visible_days", (visible_days: number) => { this.visible_days = visible_days; - } + }, ); } } diff --git a/ui/src/components/BulmaBreadcrumbs.vue b/ui/src/components/BulmaBreadcrumbs.vue index 95657c0..43a1b67 100644 --- a/ui/src/components/BulmaBreadcrumbs.vue +++ b/ui/src/components/BulmaBreadcrumbs.vue @@ -1,8 +1,12 @@ @@ -72,7 +77,7 @@ export default class extends Vue { \ No newline at end of file + diff --git a/ui/src/components/door_map/PreviewDoor.vue b/ui/src/components/door_map/PreviewDoor.vue index bb738b8..15d62bc 100644 --- a/ui/src/components/door_map/PreviewDoor.vue +++ b/ui/src/components/door_map/PreviewDoor.vue @@ -1,12 +1,27 @@