From 78bc7a7d8ced1bbf097fef1c2fcaf31360a851e3 Mon Sep 17 00:00:00 2001 From: reyniersbram <55666730+reyniersbram@users.noreply.github.com> Date: Sat, 24 Feb 2024 12:41:02 +0100 Subject: [PATCH 1/7] set indent size to 4 --- backend/.flake8 | 1 + frontend/.prettierrc.json | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/.flake8 b/backend/.flake8 index c0bc09d9..4be9676a 100644 --- a/backend/.flake8 +++ b/backend/.flake8 @@ -1,3 +1,4 @@ [flake8] extend-ignore = E203 exclude = .git,__pycache__,venv +indent-size = 4 diff --git a/frontend/.prettierrc.json b/frontend/.prettierrc.json index 66e23359..e40e6335 100644 --- a/frontend/.prettierrc.json +++ b/frontend/.prettierrc.json @@ -1,8 +1,8 @@ { "$schema": "https://json.schemastore.org/prettierrc", "semi": false, - "tabWidth": 2, + "tabWidth": 4, "singleQuote": true, "printWidth": 100, "trailingComma": "none" -} \ No newline at end of file +} From da98c74e3e30c48447b07ecf7daac8d7b030fb76 Mon Sep 17 00:00:00 2001 From: reyniersbram <55666730+reyniersbram@users.noreply.github.com> Date: Sat, 24 Feb 2024 12:41:39 +0100 Subject: [PATCH 2/7] format frontend with new indent size --- frontend/src/App.vue | 98 ++++++------- frontend/src/assets/base.css | 118 +++++++-------- frontend/src/assets/main.css | 40 +++--- frontend/src/components/HelloWorld.vue | 38 ++--- frontend/src/components/TheWelcome.vue | 135 +++++++++--------- frontend/src/components/WelcomeItem.vue | 122 ++++++++-------- .../components/__tests__/HelloWorld.spec.ts | 8 +- .../src/components/icons/IconCommunity.vue | 10 +- .../components/icons/IconDocumentation.vue | 10 +- .../src/components/icons/IconEcosystem.vue | 10 +- frontend/src/components/icons/IconSupport.vue | 10 +- frontend/src/components/icons/IconTooling.vue | 32 ++--- frontend/src/router/index.ts | 32 ++--- frontend/src/stores/counter.ts | 12 +- frontend/src/views/AboutView.vue | 16 +-- frontend/src/views/HomeView.vue | 6 +- 16 files changed, 350 insertions(+), 347 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 7905b051..33f1bfd6 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -4,82 +4,82 @@ import HelloWorld from './components/HelloWorld.vue' diff --git a/frontend/src/assets/base.css b/frontend/src/assets/base.css index 8816868a..8710b9ae 100644 --- a/frontend/src/assets/base.css +++ b/frontend/src/assets/base.css @@ -1,86 +1,86 @@ /* color palette from */ :root { - --vt-c-white: #ffffff; - --vt-c-white-soft: #f8f8f8; - --vt-c-white-mute: #f2f2f2; + --vt-c-white: #ffffff; + --vt-c-white-soft: #f8f8f8; + --vt-c-white-mute: #f2f2f2; - --vt-c-black: #181818; - --vt-c-black-soft: #222222; - --vt-c-black-mute: #282828; + --vt-c-black: #181818; + --vt-c-black-soft: #222222; + --vt-c-black-mute: #282828; - --vt-c-indigo: #2c3e50; + --vt-c-indigo: #2c3e50; - --vt-c-divider-light-1: rgba(60, 60, 60, 0.29); - --vt-c-divider-light-2: rgba(60, 60, 60, 0.12); - --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65); - --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48); + --vt-c-divider-light-1: rgba(60, 60, 60, 0.29); + --vt-c-divider-light-2: rgba(60, 60, 60, 0.12); + --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65); + --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48); - --vt-c-text-light-1: var(--vt-c-indigo); - --vt-c-text-light-2: rgba(60, 60, 60, 0.66); - --vt-c-text-dark-1: var(--vt-c-white); - --vt-c-text-dark-2: rgba(235, 235, 235, 0.64); + --vt-c-text-light-1: var(--vt-c-indigo); + --vt-c-text-light-2: rgba(60, 60, 60, 0.66); + --vt-c-text-dark-1: var(--vt-c-white); + --vt-c-text-dark-2: rgba(235, 235, 235, 0.64); } /* semantic color variables for this project */ :root { - --color-background: var(--vt-c-white); - --color-background-soft: var(--vt-c-white-soft); - --color-background-mute: var(--vt-c-white-mute); + --color-background: var(--vt-c-white); + --color-background-soft: var(--vt-c-white-soft); + --color-background-mute: var(--vt-c-white-mute); - --color-border: var(--vt-c-divider-light-2); - --color-border-hover: var(--vt-c-divider-light-1); + --color-border: var(--vt-c-divider-light-2); + --color-border-hover: var(--vt-c-divider-light-1); - --color-heading: var(--vt-c-text-light-1); - --color-text: var(--vt-c-text-light-1); + --color-heading: var(--vt-c-text-light-1); + --color-text: var(--vt-c-text-light-1); - --section-gap: 160px; + --section-gap: 160px; } @media (prefers-color-scheme: dark) { - :root { - --color-background: var(--vt-c-black); - --color-background-soft: var(--vt-c-black-soft); - --color-background-mute: var(--vt-c-black-mute); + :root { + --color-background: var(--vt-c-black); + --color-background-soft: var(--vt-c-black-soft); + --color-background-mute: var(--vt-c-black-mute); - --color-border: var(--vt-c-divider-dark-2); - --color-border-hover: var(--vt-c-divider-dark-1); + --color-border: var(--vt-c-divider-dark-2); + --color-border-hover: var(--vt-c-divider-dark-1); - --color-heading: var(--vt-c-text-dark-1); - --color-text: var(--vt-c-text-dark-2); - } + --color-heading: var(--vt-c-text-dark-1); + --color-text: var(--vt-c-text-dark-2); + } } *, *::before, *::after { - box-sizing: border-box; - margin: 0; - font-weight: normal; + box-sizing: border-box; + margin: 0; + font-weight: normal; } body { - min-height: 100vh; - color: var(--color-text); - background: var(--color-background); - transition: - color 0.5s, - background-color 0.5s; - line-height: 1.6; - font-family: - Inter, - -apple-system, - BlinkMacSystemFont, - 'Segoe UI', - Roboto, - Oxygen, - Ubuntu, - Cantarell, - 'Fira Sans', - 'Droid Sans', - 'Helvetica Neue', - sans-serif; - font-size: 15px; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; + min-height: 100vh; + color: var(--color-text); + background: var(--color-background); + transition: + color 0.5s, + background-color 0.5s; + line-height: 1.6; + font-family: + Inter, + -apple-system, + BlinkMacSystemFont, + 'Segoe UI', + Roboto, + Oxygen, + Ubuntu, + Cantarell, + 'Fira Sans', + 'Droid Sans', + 'Helvetica Neue', + sans-serif; + font-size: 15px; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } diff --git a/frontend/src/assets/main.css b/frontend/src/assets/main.css index 36fb845b..2fe73bb6 100644 --- a/frontend/src/assets/main.css +++ b/frontend/src/assets/main.css @@ -1,35 +1,35 @@ @import './base.css'; #app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - font-weight: normal; + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + font-weight: normal; } a, .green { - text-decoration: none; - color: hsla(160, 100%, 37%, 1); - transition: 0.4s; - padding: 3px; + text-decoration: none; + color: hsla(160, 100%, 37%, 1); + transition: 0.4s; + padding: 3px; } @media (hover: hover) { - a:hover { - background-color: hsla(160, 100%, 37%, 0.2); - } + a:hover { + background-color: hsla(160, 100%, 37%, 0.2); + } } @media (min-width: 1024px) { - body { - display: flex; - place-items: center; - } + body { + display: flex; + place-items: center; + } - #app { - display: grid; - grid-template-columns: 1fr 1fr; - padding: 0 2rem; - } + #app { + display: grid; + grid-template-columns: 1fr 1fr; + padding: 0 2rem; + } } diff --git a/frontend/src/components/HelloWorld.vue b/frontend/src/components/HelloWorld.vue index 38d821ef..fefd9253 100644 --- a/frontend/src/components/HelloWorld.vue +++ b/frontend/src/components/HelloWorld.vue @@ -1,41 +1,41 @@ diff --git a/frontend/src/components/TheWelcome.vue b/frontend/src/components/TheWelcome.vue index 49d8f735..84c3146b 100644 --- a/frontend/src/components/TheWelcome.vue +++ b/frontend/src/components/TheWelcome.vue @@ -8,81 +8,84 @@ import SupportIcon from './icons/IconSupport.vue' diff --git a/frontend/src/components/WelcomeItem.vue b/frontend/src/components/WelcomeItem.vue index 6d7086ae..8325ed13 100644 --- a/frontend/src/components/WelcomeItem.vue +++ b/frontend/src/components/WelcomeItem.vue @@ -1,87 +1,87 @@ diff --git a/frontend/src/components/__tests__/HelloWorld.spec.ts b/frontend/src/components/__tests__/HelloWorld.spec.ts index 25332020..bc865f03 100644 --- a/frontend/src/components/__tests__/HelloWorld.spec.ts +++ b/frontend/src/components/__tests__/HelloWorld.spec.ts @@ -4,8 +4,8 @@ import { mount } from '@vue/test-utils' import HelloWorld from '../HelloWorld.vue' describe('HelloWorld', () => { - it('renders properly', () => { - const wrapper = mount(HelloWorld, { props: { msg: 'Hello Vitest' } }) - expect(wrapper.text()).toContain('Hello Vitest') - }) + it('renders properly', () => { + const wrapper = mount(HelloWorld, { props: { msg: 'Hello Vitest' } }) + expect(wrapper.text()).toContain('Hello Vitest') + }) }) diff --git a/frontend/src/components/icons/IconCommunity.vue b/frontend/src/components/icons/IconCommunity.vue index 2dc8b055..36348e2e 100644 --- a/frontend/src/components/icons/IconCommunity.vue +++ b/frontend/src/components/icons/IconCommunity.vue @@ -1,7 +1,7 @@ diff --git a/frontend/src/components/icons/IconDocumentation.vue b/frontend/src/components/icons/IconDocumentation.vue index 6d4791cf..0c0fa761 100644 --- a/frontend/src/components/icons/IconDocumentation.vue +++ b/frontend/src/components/icons/IconDocumentation.vue @@ -1,7 +1,7 @@ diff --git a/frontend/src/components/icons/IconEcosystem.vue b/frontend/src/components/icons/IconEcosystem.vue index c3a4f078..0702bbbe 100644 --- a/frontend/src/components/icons/IconEcosystem.vue +++ b/frontend/src/components/icons/IconEcosystem.vue @@ -1,7 +1,7 @@ diff --git a/frontend/src/components/icons/IconSupport.vue b/frontend/src/components/icons/IconSupport.vue index 7452834d..908b94c4 100644 --- a/frontend/src/components/icons/IconSupport.vue +++ b/frontend/src/components/icons/IconSupport.vue @@ -1,7 +1,7 @@ diff --git a/frontend/src/components/icons/IconTooling.vue b/frontend/src/components/icons/IconTooling.vue index 660598d7..9e820684 100644 --- a/frontend/src/components/icons/IconTooling.vue +++ b/frontend/src/components/icons/IconTooling.vue @@ -1,19 +1,19 @@ diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index a49ae507..655843cb 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -2,22 +2,22 @@ import { createRouter, createWebHistory } from 'vue-router' import HomeView from '../views/HomeView.vue' const router = createRouter({ - history: createWebHistory(import.meta.env.BASE_URL), - routes: [ - { - path: '/', - name: 'home', - component: HomeView - }, - { - path: '/about', - name: 'about', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/AboutView.vue') - } - ] + history: createWebHistory(import.meta.env.BASE_URL), + routes: [ + { + path: '/', + name: 'home', + component: HomeView + }, + { + path: '/about', + name: 'about', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/AboutView.vue') + } + ] }) export default router diff --git a/frontend/src/stores/counter.ts b/frontend/src/stores/counter.ts index b6757ba5..5cdda009 100644 --- a/frontend/src/stores/counter.ts +++ b/frontend/src/stores/counter.ts @@ -2,11 +2,11 @@ import { ref, computed } from 'vue' import { defineStore } from 'pinia' export const useCounterStore = defineStore('counter', () => { - const count = ref(0) - const doubleCount = computed(() => count.value * 2) - function increment() { - count.value++ - } + const count = ref(0) + const doubleCount = computed(() => count.value * 2) + function increment() { + count.value++ + } - return { count, doubleCount, increment } + return { count, doubleCount, increment } }) diff --git a/frontend/src/views/AboutView.vue b/frontend/src/views/AboutView.vue index 756ad2a1..f470365d 100644 --- a/frontend/src/views/AboutView.vue +++ b/frontend/src/views/AboutView.vue @@ -1,15 +1,15 @@ diff --git a/frontend/src/views/HomeView.vue b/frontend/src/views/HomeView.vue index d5c0217e..c3b238e5 100644 --- a/frontend/src/views/HomeView.vue +++ b/frontend/src/views/HomeView.vue @@ -3,7 +3,7 @@ import TheWelcome from '../components/TheWelcome.vue' From 93c52d66c620c49a729db002c61320b166967246 Mon Sep 17 00:00:00 2001 From: reyniersbram <55666730+reyniersbram@users.noreply.github.com> Date: Sat, 24 Feb 2024 12:48:11 +0100 Subject: [PATCH 3/7] add editorconfig --- frontend/.editorconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 frontend/.editorconfig diff --git a/frontend/.editorconfig b/frontend/.editorconfig new file mode 100644 index 00000000..88af73ee --- /dev/null +++ b/frontend/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 4 +tab_width = 4 +insert_final_newline = true +trim_trailing_whitespace = true From d37ddf9510e9fa3921fa7d3332ff2b3282ab90c4 Mon Sep 17 00:00:00 2001 From: reyniersbram <55666730+reyniersbram@users.noreply.github.com> Date: Sat, 24 Feb 2024 12:58:08 +0100 Subject: [PATCH 4/7] update .prettierrc, add backend .editorconfig --- backend/.editorconfig | 10 ++++++++++ frontend/.prettierrc.json | 14 ++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 backend/.editorconfig diff --git a/backend/.editorconfig b/backend/.editorconfig new file mode 100644 index 00000000..88af73ee --- /dev/null +++ b/backend/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 4 +tab_width = 4 +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/frontend/.prettierrc.json b/frontend/.prettierrc.json index e40e6335..38ea8d96 100644 --- a/frontend/.prettierrc.json +++ b/frontend/.prettierrc.json @@ -1,8 +1,10 @@ { - "$schema": "https://json.schemastore.org/prettierrc", - "semi": false, - "tabWidth": 4, - "singleQuote": true, - "printWidth": 100, - "trailingComma": "none" + "$schema": "https://json.schemastore.org/prettierrc", + "semi": false, + "tabWidth": 4, + "singleQuote": true, + "printWidth": 100, + "trailingComma": "es5", + "bracketSpacing": true, + "vueIndentScriptAndStyle": false } From 37b62e480b43c6b6182031de348fd680e5ad0108 Mon Sep 17 00:00:00 2001 From: reyniersbram <55666730+reyniersbram@users.noreply.github.com> Date: Sat, 24 Feb 2024 13:01:21 +0100 Subject: [PATCH 5/7] update pretterrc --- frontend/.prettierrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/.prettierrc.json b/frontend/.prettierrc.json index 38ea8d96..cd12ad7d 100644 --- a/frontend/.prettierrc.json +++ b/frontend/.prettierrc.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/prettierrc", - "semi": false, + "semi": true, "tabWidth": 4, "singleQuote": true, "printWidth": 100, From 5625538863440a3f4b52ea9b77b37f0d58612c67 Mon Sep 17 00:00:00 2001 From: reyniersbram <55666730+reyniersbram@users.noreply.github.com> Date: Sat, 24 Feb 2024 13:01:34 +0100 Subject: [PATCH 6/7] format with new pretierrc --- frontend/src/App.vue | 4 ++-- frontend/src/components/HelloWorld.vue | 4 ++-- frontend/src/components/TheWelcome.vue | 12 ++++++------ .../components/__tests__/HelloWorld.spec.ts | 14 +++++++------- frontend/src/main.ts | 18 +++++++++--------- frontend/src/router/index.ts | 16 ++++++++-------- frontend/src/stores/counter.ts | 14 +++++++------- frontend/src/views/HomeView.vue | 2 +- 8 files changed, 42 insertions(+), 42 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 33f1bfd6..72d4f530 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,6 +1,6 @@