Skip to content

Commit

Permalink
Fixes formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronzi committed Aug 8, 2024
1 parent 7a96971 commit bd5f0e5
Show file tree
Hide file tree
Showing 11 changed files with 119 additions and 118 deletions.
66 changes: 33 additions & 33 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/go
{
"name": "Go with MySQL and Vue 3",
// Specify the Docker Compose file instead of a single image
"dockerComposeFile": "./docker-compose.yml",
// Define the service name of your application container defined in the Docker Compose file
"service": "app",
"workspaceFolder": "/workspace",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"settings": {},
"extensions": [
"Vue.volar",
"esbenp.prettier-vscode",
"redhat.vscode-yaml",
"adpyke.vscode-sql-formatter",
"golang.go",
"GitHub.vscode-github-actions",
"msyrus.go-doc",
"ms-azuretools.vscode-docker",
"ms-vsliveshare.vsliveshare",
"actboy168.tasks"
]
}
},
// Use 'postCreateCommand' to run commands after the container is created. Add npm
"postCreateCommand": "go install github.com/swaggo/swag/cmd/swag@latest && sudo apt-get update && sudo apt-get install -y nodejs npm && sudo npm install -g npm && sudo npm install -g yarn && sudo npm install -g prettier@latest && sudo npm install -g prettier-plugin-vue"
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/go
{
"name": "Go with MySQL and Vue 3",
// Specify the Docker Compose file instead of a single image
"dockerComposeFile": "./docker-compose.yml",
// Define the service name of your application container defined in the Docker Compose file
"service": "app",
"workspaceFolder": "/workspace",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"settings": {},
"extensions": [
"Vue.volar",
"esbenp.prettier-vscode",
"redhat.vscode-yaml",
"adpyke.vscode-sql-formatter",
"golang.go",
"GitHub.vscode-github-actions",
"msyrus.go-doc",
"ms-azuretools.vscode-docker",
"ms-vsliveshare.vsliveshare",
"actboy168.tasks"
]
}
},
// Use 'postCreateCommand' to run commands after the container is created. Add npm
"postCreateCommand": "go install github.com/swaggo/swag/cmd/swag@latest && sudo apt-get update && sudo apt-get install -y nodejs npm && sudo npm install -g npm && sudo npm install -g yarn && sudo npm install -g prettier@latest && sudo npm install -g prettier-plugin-vue"
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
backend/
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"[vue]": {
"editor.insertSpaces": true,
"editor.formatOnSave": false,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
Expand All @@ -33,5 +33,5 @@
"editor.insertSpaces": true,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
}
}
34 changes: 19 additions & 15 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
"label": "Start AAS Hub frontend",
"type": "shell",
"command": "yarn",
"args": [
"dev",
"--host"
],
"args": ["dev", "--host"],
"options": {
"cwd": "${workspaceFolder}/frontend/aashub"
},
Expand All @@ -23,9 +20,7 @@
"label": "Install dependencies",
"type": "shell",
"command": "yarn",
"args": [
"install"
],
"args": ["install"],
"options": {
"cwd": "${workspaceFolder}/frontend/aashub"
},
Expand All @@ -40,9 +35,7 @@
"label": "Lint AAS Hub frontend",
"type": "shell",
"command": "yarn",
"args": [
"lint:check"
],
"args": ["lint:check"],
"options": {
"cwd": "${workspaceFolder}/frontend/aashub"
},
Expand All @@ -57,11 +50,7 @@
"label": "Check code formatting",
"type": "shell",
"command": "npx",
"args": [
"prettier",
"--check",
"\"**/*.{ts,vue,json,js}\""
],
"args": ["prettier", "--check", "\"**/*.{ts,vue,json,js}\""],
"options": {
"cwd": "${workspaceFolder}"
},
Expand All @@ -71,6 +60,21 @@
},
"problemMatcher": [],
"detail": "Check code formatting using Prettier"
},
{
"label": "Fix code formatting",
"type": "shell",
"command": "npx",
"args": ["prettier", "--write", "\"**/*.{ts,vue,json,js}\""],
"options": {
"cwd": "${workspaceFolder}"
},
"group": {
"kind": "build",
"isDefault": false
},
"problemMatcher": [],
"detail": "Fix code formatting using Prettier"
}
]
}
2 changes: 1 addition & 1 deletion frontend/aashub/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export {}
export {};

/* prettier-ignore */
declare module 'vue' {
Expand Down
43 changes: 22 additions & 21 deletions frontend/aashub/src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<div class="text-center">
<div class="text-body-2 font-weight-light mb-n1">Welcome to the</div>

<h1 class="text-h2 font-weight-bold">AAS Hub</h1>
</div>
<h1 class="text-h2 font-weight-bold">AAS Hub</h1>
</div>

<div class="py-4" />

Expand All @@ -16,7 +16,7 @@
<v-card
class="py-4"
color="surface-variant"
image="https://cdn.vuetifyjs.com/docs/images/one/create/feature.png"
image="https://cdn.vuetifyjs.com/docs/images/one/create/feature.png"
prepend-icon="mdi-rocket-launch-outline"
rounded="lg"
variant="outlined"
Expand Down Expand Up @@ -47,7 +47,8 @@
color="surface-variant"
href="https://vuetifyjs.com/"
prepend-icon="mdi-text-box-outline"
rel="noopener noreferrer" rounded="lg"
rel="noopener noreferrer"
rounded="lg"
subtitle="Learn about all things Vuetify in our documentation."
target="_blank"
title="Documentation"
Expand Down Expand Up @@ -93,23 +94,23 @@
</v-card>
</v-col>

<v-col cols="6">
<v-card
append-icon="mdi-open-in-new"
class="py-4"
color="surface-variant"
href="https://discord.vuetifyjs.com"
prepend-icon="mdi-account-group-outline"
rel="noopener noreferrer"
rounded="lg"
subtitle="Connect with Vuetify developers."
target="_blank"
title="Community"
variant="text"
>
<v-overlay opacity=".06" scrim="primary" contained model-value persistent />
</v-card>
</v-col>
<v-col cols="6">
<v-card
append-icon="mdi-open-in-new"
class="py-4"
color="surface-variant"
href="https://discord.vuetifyjs.com"
prepend-icon="mdi-account-group-outline"
rel="noopener noreferrer"
rounded="lg"
subtitle="Connect with Vuetify developers."
target="_blank"
title="Community"
variant="text"
>
<v-overlay opacity=".06" scrim="primary" contained model-value persistent />
</v-card>
</v-col>
</v-row>
</v-responsive>
</v-container>
Expand Down
8 changes: 4 additions & 4 deletions frontend/aashub/src/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*/

// Plugins
import vuetify from './vuetify'
import vuetify from './vuetify';

// Types
import type { App } from 'vue'
import type { App } from 'vue';

export function registerPlugins (app: App) {
app.use(vuetify)
export function registerPlugins(app: App) {
app.use(vuetify);
}
8 changes: 4 additions & 4 deletions frontend/aashub/src/plugins/vuetify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
*/

// Styles
import '@mdi/font/css/materialdesignicons.css'
import 'vuetify/styles'
import '@mdi/font/css/materialdesignicons.css';
import 'vuetify/styles';

// Composables
import { createVuetify } from 'vuetify'
import { createVuetify } from 'vuetify';

// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
export default createVuetify({
theme: {
defaultTheme: 'dark',
},
})
});
6 changes: 3 additions & 3 deletions frontend/aashub/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types="vite/client" />

declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
import type { DefineComponent } from 'vue';
const component: DefineComponent<{}, {}, any>;

Check warning on line 5 in frontend/aashub/src/vite-env.d.ts

View workflow job for this annotation

GitHub Actions / lint

Don't use `{}` as a type. Consider using a more specific type instead of `{}`

Check warning on line 5 in frontend/aashub/src/vite-env.d.ts

View workflow job for this annotation

GitHub Actions / lint

Don't use `{}` as a type. Consider using a more specific type instead of `{}`

Check warning on line 5 in frontend/aashub/src/vite-env.d.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
export default component;
}
51 changes: 23 additions & 28 deletions frontend/aashub/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
{
"compilerOptions": {
"target": "ESNext",
"jsx": "preserve",
"lib": ["DOM", "ESNext"],
"baseUrl": ".",
"module": "ESNext",
"moduleResolution": "bundler",
"paths": {
"@/*": ["src/*"]
"compilerOptions": {
"target": "ESNext",
"jsx": "preserve",
"lib": ["DOM", "ESNext"],
"baseUrl": ".",
"module": "ESNext",
"moduleResolution": "bundler",
"paths": {
"@/*": ["src/*"]
},
"resolveJsonModule": true,
"types": ["vite/client"],
"allowJs": true,
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"skipLibCheck": true
},
"resolveJsonModule": true,
"types": [
"vite/client"
],
"allowJs": true,
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"skipLibCheck": true
},
"include": [
"src/**/*",
"src/**/*.vue"
],
"exclude": ["dist", "node_modules", "cypress"],
"references": [{ "path": "./tsconfig.node.json" }],
"include": ["src/**/*", "src/**/*.vue"],
"exclude": ["dist", "node_modules", "cypress"],
"references": [{ "path": "./tsconfig.node.json" }]
}
14 changes: 7 additions & 7 deletions frontend/aashub/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"composite": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.mts"]
"compilerOptions": {
"composite": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.mts"]
}

0 comments on commit bd5f0e5

Please sign in to comment.