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/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/.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 diff --git a/frontend/.prettierrc.json b/frontend/.prettierrc.json index 66e23359..cd12ad7d 100644 --- a/frontend/.prettierrc.json +++ b/frontend/.prettierrc.json @@ -1,8 +1,10 @@ { - "$schema": "https://json.schemastore.org/prettierrc", - "semi": false, - "tabWidth": 2, - "singleQuote": true, - "printWidth": 100, - "trailingComma": "none" -} \ No newline at end of file + "$schema": "https://json.schemastore.org/prettierrc", + "semi": true, + "tabWidth": 4, + "singleQuote": true, + "printWidth": 100, + "trailingComma": "es5", + "bracketSpacing": true, + "vueIndentScriptAndStyle": false +} diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 7905b051..1a13d3a9 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,85 +1,85 @@ - - + + 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..aace61ca 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..46cf1134 100644 --- a/frontend/src/components/TheWelcome.vue +++ b/frontend/src/components/TheWelcome.vue @@ -1,88 +1,91 @@ - - + + 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..a4490f08 100644 --- a/frontend/src/components/__tests__/HelloWorld.spec.ts +++ b/frontend/src/components/__tests__/HelloWorld.spec.ts @@ -1,11 +1,11 @@ -import { describe, it, expect } from 'vitest' +import { describe, it, expect } from 'vitest'; -import { mount } from '@vue/test-utils' -import HelloWorld from '../HelloWorld.vue' +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/main.ts b/frontend/src/main.ts index 5dcad83c..841d69f6 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -1,14 +1,14 @@ -import './assets/main.css' +import './assets/main.css'; -import { createApp } from 'vue' -import { createPinia } from 'pinia' +import { createApp } from 'vue'; +import { createPinia } from 'pinia'; -import App from './App.vue' -import router from './router' +import App from './App.vue'; +import router from './router'; -const app = createApp(App) +const app = createApp(App); -app.use(createPinia()) -app.use(router) +app.use(createPinia()); +app.use(router); -app.mount('#app') +app.mount('#app'); diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index a49ae507..3e79733a 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -1,23 +1,23 @@ -import { createRouter, createWebHistory } from 'vue-router' -import HomeView from '../views/HomeView.vue' +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 +export default router; diff --git a/frontend/src/stores/counter.ts b/frontend/src/stores/counter.ts index b6757ba5..a4c345e0 100644 --- a/frontend/src/stores/counter.ts +++ b/frontend/src/stores/counter.ts @@ -1,12 +1,12 @@ -import { ref, computed } from 'vue' -import { defineStore } from 'pinia' +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..a6ac7202 100644 --- a/frontend/src/views/HomeView.vue +++ b/frontend/src/views/HomeView.vue @@ -1,9 +1,9 @@ - - + +