From 1e8b113cc909bb2240be71ea881c6eae3b415675 Mon Sep 17 00:00:00 2001 From: Darko Gjorgjijoski Date: Thu, 11 Jun 2026 11:00:08 +0200 Subject: [PATCH] =?UTF-8?q?refactor(frontend):=20drop=20unused=20deps,=20m?= =?UTF-8?q?oment=E2=86=92date-fns,=20guid=E2=86=92crypto.randomUUID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove 10 unused/redundant frontend dependencies (@stripe/stripe-js, maska, @vuelidate/components, path, mini-svg-data-uri, @types/node, @tailwindcss/forms, brace-expansion [kept only as a resolutions pin], moment, guid). Replace moment with the already-present date-fns via a shared utils/date-range.ts (used by the 4 report views), and guid with native crypto.randomUUID(). Add tsconfig ignoreDeprecations so the vue-tsc typecheck script can run. --- package.json | 18 +- .../components/CreateCustomFields.vue | 10 +- .../invoices/views/InvoiceCreateView.vue | 15 +- .../reports/views/ExpensesReportView.vue | 63 +------ .../reports/views/ProfitLossReportView.vue | 63 +------ .../company/reports/views/SalesReportView.vue | 67 ++----- .../company/reports/views/TaxReportView.vue | 63 +------ .../settings/components/NumberCustomizer.vue | 6 +- resources/scripts/utils/date-range.ts | 89 +++++++++ resources/scripts/utils/generate-client-id.ts | 4 +- tsconfig.json | 1 + yarn.lock | 176 +++++++++--------- 12 files changed, 244 insertions(+), 331 deletions(-) create mode 100644 resources/scripts/utils/date-range.ts diff --git a/package.json b/package.json index 1f85467f..9e6ee57d 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,15 @@ "watch": "vite build --watch", "build": "vite build", "serve": "vite preview", - "test": "eslint ./resources/scripts" + "test": "eslint ./resources/scripts", + "lint": "eslint ./resources/scripts --max-warnings 0", + "lint:fix": "eslint ./resources/scripts --fix", + "typecheck": "vue-tsc --noEmit", + "prepare": "git config core.hooksPath .githooks || true" }, "devDependencies": { - "@tailwindcss/forms": "^0.5.10", "@tailwindcss/typography": "^0.5.16", + "@typescript-eslint/parser": "^8.0.0", "@tailwindcss/vite": "^4.0.0", "@types/lodash": "^4.17.24", "@vitejs/plugin-vue": "^6.0.0", @@ -25,6 +29,7 @@ "tailwind-scrollbar": "^4.0.0", "tailwindcss": "^4.0.0", "typescript": "^6.0.2", + "vue-eslint-parser": "^10.0.0", "vue-tsc": "^3.2.6" }, "resolutions": { @@ -34,30 +39,21 @@ "@headlessui/vue": "^1.7.23", "@heroicons/vue": "^2.2.0", "@popperjs/core": "^2.11.8", - "@stripe/stripe-js": "^2.4.0", "@tiptap/core": "^3.0.0", "@tiptap/extension-text-align": "^3.0.0", "@tiptap/pm": "^3.0.0", "@tiptap/starter-kit": "^3.0.0", "@tiptap/vue-3": "^3.0.0", - "@types/node": "^24.0.0", - "@vuelidate/components": "^1.2.6", "@vuelidate/core": "^2.0.3", "@vuelidate/validators": "^2.0.4", "@vueuse/core": "^14.0.0", "axios": "1.17.0", - "brace-expansion": "^5.0.6", "chart.js": "^4.5.1", "date-fns": "^4.1.0", "dompurify": "^3.3.3", - "guid": "^0.0.12", "laravel-vite-plugin": "^3.0.0", "lodash": "^4.17.21", "marked": "^18.0.0", - "maska": "^3.0.4", - "mini-svg-data-uri": "^1.4.4", - "moment": "^2.30.1", - "path": "^0.12.7", "pinia": "^3.0.0", "v-money3": "^3.24.1", "v-tooltip": "^4.0.0-beta.17", diff --git a/resources/scripts/features/company/customers/components/CreateCustomFields.vue b/resources/scripts/features/company/customers/components/CreateCustomFields.vue index 576f5c68..83f49de0 100644 --- a/resources/scripts/features/company/customers/components/CreateCustomFields.vue +++ b/resources/scripts/features/company/customers/components/CreateCustomFields.vue @@ -1,7 +1,7 @@