From 792357803b129c15766a0114819e982ea083efb5 Mon Sep 17 00:00:00 2001 From: Adrien Carpentier Date: Wed, 4 Dec 2024 11:24:43 +0100 Subject: [PATCH] style: lint and format code --- frontend/components.json | 34 ++-- frontend/postcss.config.js | 10 +- frontend/src/App.vue | 40 ++--- frontend/src/components/HeaderComponent.vue | 6 +- frontend/src/components/HistogramChart.vue | 154 +++++++++--------- frontend/src/components/MapComponent.vue | 13 +- frontend/src/components/MobileMessage.vue | 4 +- .../src/components/QuestionsComponent.vue | 68 ++++---- frontend/src/components/SidebarComponent.vue | 107 ++++++------ frontend/src/components/TableauComponent.vue | 4 +- .../components/map/MapTooltipComponent.vue | 15 +- frontend/src/components/sidebar/TileTwo.vue | 119 +++++++------- frontend/src/components/ui/card/Card.vue | 8 +- .../src/components/ui/card/CardContent.vue | 8 +- .../components/ui/card/CardDescription.vue | 8 +- .../src/components/ui/card/CardFooter.vue | 8 +- .../src/components/ui/card/CardHeader.vue | 8 +- frontend/src/components/ui/card/CardTitle.vue | 8 +- frontend/src/components/ui/card/index.ts | 12 +- frontend/src/index.css | 100 ++++++------ frontend/src/main.ts | 4 +- frontend/src/shims-vue.d.ts | 10 +- frontend/src/store/appStore.ts | 68 ++++---- frontend/src/utils.ts | 6 +- frontend/tailwind.config.js | 2 +- frontend/tsconfig.json | 5 +- frontend/vite.config.ts | 4 +- 27 files changed, 432 insertions(+), 401 deletions(-) diff --git a/frontend/components.json b/frontend/components.json index 75e5230..4c9826d 100644 --- a/frontend/components.json +++ b/frontend/components.json @@ -1,18 +1,18 @@ { - "$schema": "https://shadcn-vue.com/schema.json", - "style": "default", - "typescript": true, - "tsConfigPath": "./tsconfig.json", - "tailwind": { - "config": "tailwind.config.js", - "css": "src/index.css", - "baseColor": "slate", - "cssVariables": true, - "prefix": "" - }, - "framework": "vite", - "aliases": { - "components": "@/components", - "utils": "@/utils" - } -} \ No newline at end of file + "$schema": "https://shadcn-vue.com/schema.json", + "style": "default", + "typescript": true, + "tsConfigPath": "./tsconfig.json", + "tailwind": { + "config": "tailwind.config.js", + "css": "src/index.css", + "baseColor": "slate", + "cssVariables": true, + "prefix": "" + }, + "framework": "vite", + "aliases": { + "components": "@/components", + "utils": "@/utils" + } +} diff --git a/frontend/postcss.config.js b/frontend/postcss.config.js index 88a3558..e873f1a 100644 --- a/frontend/postcss.config.js +++ b/frontend/postcss.config.js @@ -1,6 +1,6 @@ module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, - } \ No newline at end of file + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 8ca5f59..5fe8274 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -9,32 +9,32 @@ @@ -77,4 +77,4 @@ body, html, #app { font-size: 1rem; margin: 10px 0 0; } - \ No newline at end of file + diff --git a/frontend/src/components/HeaderComponent.vue b/frontend/src/components/HeaderComponent.vue index 1a90ae3..4c79364 100644 --- a/frontend/src/components/HeaderComponent.vue +++ b/frontend/src/components/HeaderComponent.vue @@ -86,7 +86,7 @@ import tableGreyIcon from "@/assets/tablegrey.svg"; interface AddressFeature { banId: string; label: string; - citycode: string; + citycode: string; } interface Geometry { @@ -142,7 +142,7 @@ export default defineComponent({ const goToAddress = (coordinates: Array, code: string) => { appStore.updateAddress(coordinates); - appStore.updateCodeInsee(code); + appStore.updateCodeInsee(code); resultsAdresses.value = null; }; @@ -284,4 +284,4 @@ export default defineComponent({ background-color: #ebebeb; } - \ No newline at end of file + diff --git a/frontend/src/components/HistogramChart.vue b/frontend/src/components/HistogramChart.vue index 16d5232..4ee5973 100644 --- a/frontend/src/components/HistogramChart.vue +++ b/frontend/src/components/HistogramChart.vue @@ -1,91 +1,91 @@ diff --git a/frontend/src/components/MapComponent.vue b/frontend/src/components/MapComponent.vue index 09dbca0..2020eb1 100644 --- a/frontend/src/components/MapComponent.vue +++ b/frontend/src/components/MapComponent.vue @@ -38,7 +38,6 @@ export default defineComponent({ let displayDepLayer = true; const tooltipTitle = ref(""); // Initialize as an empty string - const tooltip = ref({ top: "0px", left: "0px", @@ -131,7 +130,7 @@ export default defineComponent({ "fill-color": "rgba(0, 0, 255, 0.2)", }, }); - + mapInstance.on("mousemove", "departements_fill", (e: any) => { tooltipTitle.value = e.features[0]["properties"]["nom"]; const depCode = e.features[0]["properties"]["code"]; @@ -185,17 +184,19 @@ export default defineComponent({ watch( () => appStore.codeInsee, - (newValue: string) => { + (newValue: string) => { fetch( - "https://object.data.gouv.fr/dataeng-open/dev/parcelles/" + appStore.codeInsee + ".json" + "https://object.data.gouv.fr/dataeng-open/dev/parcelles/" + + appStore.codeInsee + + ".json", ) .then((response) => { return response.json(); }) .then((data) => { - appStore.updateComData(data) + appStore.updateComData(data); }); - }, + }, ); watch( diff --git a/frontend/src/components/MobileMessage.vue b/frontend/src/components/MobileMessage.vue index 565feeb..c2bed9d 100644 --- a/frontend/src/components/MobileMessage.vue +++ b/frontend/src/components/MobileMessage.vue @@ -10,7 +10,7 @@ import { defineComponent } from "vue"; export default defineComponent({ - name: "MobileMessage", + name: "MobileMessage", }); @@ -45,4 +45,4 @@ p { font-size: 1rem; margin: 10px 0 0; } - \ No newline at end of file + diff --git a/frontend/src/components/QuestionsComponent.vue b/frontend/src/components/QuestionsComponent.vue index d78d8d4..879201a 100644 --- a/frontend/src/components/QuestionsComponent.vue +++ b/frontend/src/components/QuestionsComponent.vue @@ -1,35 +1,45 @@ @@ -109,4 +118,4 @@ export default defineComponent({ position: relative; z-index: 2; } - \ No newline at end of file + diff --git a/frontend/src/components/TableauComponent.vue b/frontend/src/components/TableauComponent.vue index 06490be..6aaa945 100644 --- a/frontend/src/components/TableauComponent.vue +++ b/frontend/src/components/TableauComponent.vue @@ -18,7 +18,7 @@ import { defineComponent } from "vue"; export default defineComponent({ - name: "TableauComponent", + name: "TableauComponent", }); @@ -62,4 +62,4 @@ export default defineComponent({ border: none; /* Supprime les bordures autour de l'iframe */ background: transparent; } - \ No newline at end of file + diff --git a/frontend/src/components/map/MapTooltipComponent.vue b/frontend/src/components/map/MapTooltipComponent.vue index d950324..dddbc64 100644 --- a/frontend/src/components/map/MapTooltipComponent.vue +++ b/frontend/src/components/map/MapTooltipComponent.vue @@ -27,8 +27,8 @@ diff --git a/frontend/src/components/ui/card/Card.vue b/frontend/src/components/ui/card/Card.vue index 6d784dc..d0047d0 100644 --- a/frontend/src/components/ui/card/Card.vue +++ b/frontend/src/components/ui/card/Card.vue @@ -1,10 +1,10 @@