From 9185d8ddecc832dace9fcdfc1b1ff41eefc21ae1 Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Thu, 28 Aug 2025 17:11:59 +0200 Subject: [PATCH] feat: integrate Biome for linting and formatting, update package.json and add biome.json --- apps/infoalloggi/.vscode/settings.json | 14 +- apps/infoalloggi/biome.json | 88 ++++++++ apps/infoalloggi/package-lock.json | 164 ++++++++++++++ apps/infoalloggi/package.json | 297 +++++++++++++------------ 4 files changed, 404 insertions(+), 159 deletions(-) create mode 100644 apps/infoalloggi/biome.json diff --git a/apps/infoalloggi/.vscode/settings.json b/apps/infoalloggi/.vscode/settings.json index c635fab..b2ddae4 100644 --- a/apps/infoalloggi/.vscode/settings.json +++ b/apps/infoalloggi/.vscode/settings.json @@ -12,18 +12,10 @@ "password": "rootpost" } ], - "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, - "[javascript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[typescriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, "editor.codeActionsOnSave": { - "source.fixAll.eslint": "explicit" + "source.fixAll.eslint": "explicit", + "source.fixAll.biome": "explicit", + "source.organizeImports.biome": "explicit" } } \ No newline at end of file diff --git a/apps/infoalloggi/biome.json b/apps/infoalloggi/biome.json new file mode 100644 index 0000000..018cb1a --- /dev/null +++ b/apps/infoalloggi/biome.json @@ -0,0 +1,88 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.2.2/schema.json", + "vcs": { + "enabled": true, + "root": "../../", + "clientKind": "git", + "useIgnoreFile": false + }, + + "files": { + "experimentalScannerIgnores": [ + "node_modules", + "dist", + "build", + ".next", + ".git", + "public", + ".github", + ".vscode", + "certificates", + "headers", + "schemas" + ], + "includes": [ + "**", + "!node_modules", + "!.git", + "!out", + "!public", + "!.github", + "!.vscode", + "!certificates", + "!.next", + "!.env", + "!.gitignore", + "!check-env-vars.js", + "!headers", + "!schemas", + "!kyselyRules", + "!prettier.config.cjs", + "!postcss.config.cjs", + "!.dockerignore", + "!Dockerfile", + "!*compose.yml", + "!.kanelrc.js", + "!TODO", + "!*.d.ts" + ], + "ignoreUnknown": true + }, + "formatter": { + "enabled": true, + "indentStyle": "tab" + }, + "linter": { + "enabled": true, + "domains": { + "next": "recommended", + "react": "recommended" + }, + "rules": { + "recommended": true, + "a11y": { + "noNoninteractiveElementInteractions": "error" + }, + "suspicious": { + "noArrayIndexKey": "off" + }, + + "correctness": { + "useExhaustiveDependencies": "off" + } + } + }, + "javascript": { + "formatter": { + "quoteStyle": "double" + } + }, + "assist": { + "enabled": true, + "actions": { + "source": { + "organizeImports": "on" + } + } + } +} diff --git a/apps/infoalloggi/package-lock.json b/apps/infoalloggi/package-lock.json index e2bc056..10bcb01 100644 --- a/apps/infoalloggi/package-lock.json +++ b/apps/infoalloggi/package-lock.json @@ -89,6 +89,7 @@ "zod": "^4.0.15" }, "devDependencies": { + "@biomejs/biome": "2.2.2", "@eslint/compat": "^1.3.1", "@eslint/eslintrc": "^3.3.0", "@eslint/js": "^9.32.0", @@ -1062,6 +1063,169 @@ "node": ">=6.9.0" } }, + "node_modules/@biomejs/biome": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.2.2.tgz", + "integrity": "sha512-j1omAiQWCkhuLgwpMKisNKnsM6W8Xtt1l0WZmqY/dFj8QPNkIoTvk4tSsi40FaAAkBE1PU0AFG2RWFBWenAn+w==", + "dev": true, + "license": "MIT OR Apache-2.0", + "bin": { + "biome": "bin/biome" + }, + "engines": { + "node": ">=14.21.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-darwin-arm64": "2.2.2", + "@biomejs/cli-darwin-x64": "2.2.2", + "@biomejs/cli-linux-arm64": "2.2.2", + "@biomejs/cli-linux-arm64-musl": "2.2.2", + "@biomejs/cli-linux-x64": "2.2.2", + "@biomejs/cli-linux-x64-musl": "2.2.2", + "@biomejs/cli-win32-arm64": "2.2.2", + "@biomejs/cli-win32-x64": "2.2.2" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.2.2.tgz", + "integrity": "sha512-6ePfbCeCPryWu0CXlzsWNZgVz/kBEvHiPyNpmViSt6A2eoDf4kXs3YnwQPzGjy8oBgQulrHcLnJL0nkCh80mlQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-darwin-x64": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.2.2.tgz", + "integrity": "sha512-Tn4JmVO+rXsbRslml7FvKaNrlgUeJot++FkvYIhl1OkslVCofAtS35MPlBMhXgKWF9RNr9cwHanrPTUUXcYGag==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.2.2.tgz", + "integrity": "sha512-JfrK3gdmWWTh2J5tq/rcWCOsImVyzUnOS2fkjhiYKCQ+v8PqM+du5cfB7G1kXas+7KQeKSWALv18iQqdtIMvzw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.2.2.tgz", + "integrity": "sha512-/MhYg+Bd6renn6i1ylGFL5snYUn/Ct7zoGVKhxnro3bwekiZYE8Kl39BSb0MeuqM+72sThkQv4TnNubU9njQRw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.2.2.tgz", + "integrity": "sha512-Ogb+77edO5LEP/xbNicACOWVLt8mgC+E1wmpUakr+O4nKwLt9vXe74YNuT3T1dUBxC/SnrVmlzZFC7kQJEfquQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.2.2.tgz", + "integrity": "sha512-ZCLXcZvjZKSiRY/cFANKg+z6Fhsf9MHOzj+NrDQcM+LbqYRT97LyCLWy2AS+W2vP+i89RyRM+kbGpUzbRTYWig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-arm64": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.2.2.tgz", + "integrity": "sha512-wBe2wItayw1zvtXysmHJQoQqXlTzHSpQRyPpJKiNIR21HzH/CrZRDFic1C1jDdp+zAPtqhNExa0owKMbNwW9cQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-x64": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.2.2.tgz", + "integrity": "sha512-DAuHhHekGfiGb6lCcsT4UyxQmVwQiBCBUMwVra/dcOSs9q8OhfaZgey51MlekT3p8UwRqtXQfFuEJBhJNdLZwg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, "node_modules/@date-fns/tz": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/@date-fns/tz/-/tz-1.4.1.tgz", diff --git a/apps/infoalloggi/package.json b/apps/infoalloggi/package.json index b1a13b3..b743e7a 100644 --- a/apps/infoalloggi/package.json +++ b/apps/infoalloggi/package.json @@ -1,149 +1,150 @@ { - "name": "infoalloggi", - "version": "0.1.0", - "private": true, - "scripts": { - "build": "next build", - "dev": "node ./headers/dev.js && next dev --turbopack", - "dev-https": "node ./headers/dev-https.js && cross-env NEXT_PUBLIC_BASE_URL='https://localhost:3000' INTERNAL_BASE_URL='https://localhost:3000' next dev --experimental-https --turbopack", - "idev": "cross-env NODE_OPTIONS='--inspect' next dev --turbopack", - "lint": "node ./headers/lint.js && next lint && node check-env-vars.js", - "start": "next start", - "types": "node ./headers/type.js && tsc --noEmit", - "pg-typegen": "node ./headers/pg-typegen.js && npx kanel", - "email": "cross-env NEXT_PUBLIC_BASE_URL='https://localhost:3000' email dev --port 3500", - "test": "npm run lint && npm run types", - "knip": "knip --no-exit-code", - "stripe-dev": "stripe listen --forward-to https://localhost:3000/api/stripe-webhook", - "d": "npm run-p dev stripe-dev -cl", - "test-kr": "node ./kyselyRules/rules/select.test.js && node ./kyselyRules/rules/where.test.js&& node ./kyselyRules/rules/null.test.js" - }, - "dependencies": { - "@fattureincloud/fattureincloud-ts-sdk": "^2.1.1", - "@hookform/resolvers": "^5.2.1", - "@radix-ui/react-popover": "^1.1.14", - "@radix-ui/react-scroll-area": "^1.2.9", - "@radix-ui/react-slot": "^1.2.3", - "@radix-ui/react-toggle-group": "^1.1.10", - "@react-email/components": "0.5.0", - "@react-email/render": "^1.1.4", - "@stripe/react-stripe-js": "^3.9.0", - "@stripe/stripe-js": "^7.8.0", - "@tailwindcss/forms": "^0.5.10", - "@tailwindcss/postcss": "^4.1.11", - "@tailwindcss/typography": "^0.5.16", - "@tanstack/react-query": "^5.74.4", - "@tanstack/react-table": "^8.21.3", - "@tanstack/react-virtual": "^3.13.12", - "@tiptap/core": "^3.0.9", - "@tiptap/extension-link": "^3.0.9", - "@tiptap/extension-underline": "^3.0.9", - "@tiptap/pm": "^3.0.9", - "@tiptap/react": "^3.0.9", - "@tiptap/starter-kit": "^3.0.9", - "@trpc/client": "^11.1.0", - "@trpc/next": "^11.4.3", - "@trpc/react-query": "^11.1.0", - "@trpc/server": "^11.1.0", - "@vercel/og": "^0.8.5", - "class-variance-authority": "^0.7.1", - "clsx": "^2.1.1", - "cmdk": "^1.1.1", - "cookies-next": "^6.1.0", - "date-fns": "^4.1.0", - "embla-carousel-react": "^8.6.0", - "framer-motion": "^12.8.0", - "frimousse": "^0.3.0", - "ioredis": "^5.7.0", - "jose": "^6.0.12", - "js-cookie": "^3.0.5", - "kysely": "^0.28.2", - "kysely-plugin-serialize": "^0.8.2", - "leaflet": "^1.9.4", - "leaflet-defaulticon-compatibility": "^0.1.2", - "lucide-react": "^0.536.0", - "next": "15.4.7", - "next-themes": "^0.4.6", - "nextjs-progressbar": "^0.0.16", - "nodemailer": "^7.0.5", - "nodemailer-html-to-text": "^3.2.0", - "nuqs": "^2.4.3", - "pg": "^8.16.3", - "postcss": "^8.5.6", - "radix-ui": "^1.4.2", - "react": "^19.1.0", - "react-colorful": "^5.6.1", - "react-day-picker": "^9.8.1", - "react-dom": "^19.1.1", - "react-email": "^4.2.8", - "react-hook-form": "^7.62.0", - "react-hot-toast": "^2.5.2", - "react-is": "^19.1.1", - "react-leaflet": "^5.0.0", - "react-phone-number-input": "^3.4.12", - "react-reverse-portal": "^2.3.0", - "react-select": "^5.10.2", - "react-to-print": "^3.1.1", - "react-use": "^17.6.0", - "recharts": "^2.15.4", - "sharp": "^0.34.3", - "stripe": "^18.4.0", - "superjson": "2.2.2", - "tailwind-merge": "3.3", - "tailwind-scrollbar": "^4.0.2", - "tailwindcss": "^4.1.11", - "tw-animate-css": "^1.3.6", - "type-fest": "^4.41.0", - "uuid": "^11.1.0", - "vaul": "^1.1.2", - "yaml": "^2.8.1", - "zod": "^4.0.15" - }, - "devDependencies": { - "@eslint/compat": "^1.3.1", - "@eslint/eslintrc": "^3.3.0", - "@eslint/js": "^9.32.0", - "@hookform/devtools": "^4.4.0", - "@next/eslint-plugin-next": "^15.4.5", - "@prettier/sync": "^0.6.1", - "@react-email/preview-server": "^4.2.8", - "@tanstack/eslint-plugin-query": "^5.83.1", - "@total-typescript/ts-reset": "^0.6.1", - "@types/eslint": "^9.6.1", - "@types/eslint-plugin-jsx-a11y": "^6.10.0", - "@types/js-cookie": "^3.0.6", - "@types/leaflet": "^1.9.20", - "@types/node": "^24.2.0", - "@types/nodemailer": "^6.4.17", - "@types/nodemailer-html-to-text": "^3.1.3", - "@types/pg": "^8.15.5", - "@types/react": "^19.1.8", - "@types/react-dom": "^19.1.7", - "@types/react-is": "^19.0.0", - "@types/uuid": "^10.0.0", - "@typescript-eslint/eslint-plugin": "^8.39.0", - "@typescript-eslint/parser": "^8.39.0", - "cross-env": "^10.0.0", - "eslint": "^9.32.0", - "eslint-config-next": "^15.4.5", - "eslint-import-resolver-typescript": "^4.4.4", - "eslint-plugin-better-tailwindcss": "^3.7.4", - "eslint-plugin-import": "^2.32.0", - "eslint-plugin-no-relative-import-paths": "^1.6.1", - "eslint-plugin-react": "^7.37.5", - "eslint-plugin-react-hooks": "^5.2.0", - "jiti": "^2.5.1", - "kanel": "^3.14.2", - "kanel-kysely": "^0.7.1", - "knip": "^5.62.0", - "npm-run-all": "^4.1.5", - "prettier": "^3.6.2", - "prettier-plugin-classnames": "^0.8.2", - "prettier-plugin-tailwindcss": "^0.6.14", - "typescript": "^5.9.2", - "typescript-eslint": "^8.39.0" - }, - "ct3aMetadata": { - "initVersion": "7.9.0" - } -} \ No newline at end of file + "name": "infoalloggi", + "version": "0.1.0", + "private": true, + "scripts": { + "build": "next build", + "dev": "node ./headers/dev.js && next dev --turbopack", + "dev-https": "node ./headers/dev-https.js && cross-env NEXT_PUBLIC_BASE_URL='https://localhost:3000' INTERNAL_BASE_URL='https://localhost:3000' next dev --experimental-https --turbopack", + "idev": "cross-env NODE_OPTIONS='--inspect' next dev --turbopack", + "lint": "node ./headers/lint.js && biome lint && node check-env-vars.js", + "start": "next start", + "types": "node ./headers/type.js && tsc --noEmit", + "pg-typegen": "node ./headers/pg-typegen.js && npx kanel", + "email": "cross-env NEXT_PUBLIC_BASE_URL='https://localhost:3000' email dev --port 3500", + "test": "npm run lint && npm run types", + "knip": "knip --no-exit-code", + "stripe-dev": "stripe listen --forward-to https://localhost:3000/api/stripe-webhook", + "d": "npm run-p dev stripe-dev -cl", + "test-kr": "node ./kyselyRules/rules/select.test.js && node ./kyselyRules/rules/where.test.js&& node ./kyselyRules/rules/null.test.js" + }, + "dependencies": { + "@fattureincloud/fattureincloud-ts-sdk": "^2.1.1", + "@hookform/resolvers": "^5.2.1", + "@radix-ui/react-popover": "^1.1.14", + "@radix-ui/react-scroll-area": "^1.2.9", + "@radix-ui/react-slot": "^1.2.3", + "@radix-ui/react-toggle-group": "^1.1.10", + "@react-email/components": "0.5.0", + "@react-email/render": "^1.1.4", + "@stripe/react-stripe-js": "^3.9.0", + "@stripe/stripe-js": "^7.8.0", + "@tailwindcss/forms": "^0.5.10", + "@tailwindcss/postcss": "^4.1.11", + "@tailwindcss/typography": "^0.5.16", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-table": "^8.21.3", + "@tanstack/react-virtual": "^3.13.12", + "@tiptap/core": "^3.0.9", + "@tiptap/extension-link": "^3.0.9", + "@tiptap/extension-underline": "^3.0.9", + "@tiptap/pm": "^3.0.9", + "@tiptap/react": "^3.0.9", + "@tiptap/starter-kit": "^3.0.9", + "@trpc/client": "^11.1.0", + "@trpc/next": "^11.4.3", + "@trpc/react-query": "^11.1.0", + "@trpc/server": "^11.1.0", + "@vercel/og": "^0.8.5", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "cmdk": "^1.1.1", + "cookies-next": "^6.1.0", + "date-fns": "^4.1.0", + "embla-carousel-react": "^8.6.0", + "framer-motion": "^12.8.0", + "frimousse": "^0.3.0", + "ioredis": "^5.7.0", + "jose": "^6.0.12", + "js-cookie": "^3.0.5", + "kysely": "^0.28.2", + "kysely-plugin-serialize": "^0.8.2", + "leaflet": "^1.9.4", + "leaflet-defaulticon-compatibility": "^0.1.2", + "lucide-react": "^0.536.0", + "next": "15.4.7", + "next-themes": "^0.4.6", + "nextjs-progressbar": "^0.0.16", + "nodemailer": "^7.0.5", + "nodemailer-html-to-text": "^3.2.0", + "nuqs": "^2.4.3", + "pg": "^8.16.3", + "postcss": "^8.5.6", + "radix-ui": "^1.4.2", + "react": "^19.1.0", + "react-colorful": "^5.6.1", + "react-day-picker": "^9.8.1", + "react-dom": "^19.1.1", + "react-email": "^4.2.8", + "react-hook-form": "^7.62.0", + "react-hot-toast": "^2.5.2", + "react-is": "^19.1.1", + "react-leaflet": "^5.0.0", + "react-phone-number-input": "^3.4.12", + "react-reverse-portal": "^2.3.0", + "react-select": "^5.10.2", + "react-to-print": "^3.1.1", + "react-use": "^17.6.0", + "recharts": "^2.15.4", + "sharp": "^0.34.3", + "stripe": "^18.4.0", + "superjson": "2.2.2", + "tailwind-merge": "3.3", + "tailwind-scrollbar": "^4.0.2", + "tailwindcss": "^4.1.11", + "tw-animate-css": "^1.3.6", + "type-fest": "^4.41.0", + "uuid": "^11.1.0", + "vaul": "^1.1.2", + "yaml": "^2.8.1", + "zod": "^4.0.15" + }, + "devDependencies": { + "@biomejs/biome": "2.2.2", + "@eslint/compat": "^1.3.1", + "@eslint/eslintrc": "^3.3.0", + "@eslint/js": "^9.32.0", + "@hookform/devtools": "^4.4.0", + "@next/eslint-plugin-next": "^15.4.5", + "@prettier/sync": "^0.6.1", + "@react-email/preview-server": "^4.2.8", + "@tanstack/eslint-plugin-query": "^5.83.1", + "@total-typescript/ts-reset": "^0.6.1", + "@types/eslint": "^9.6.1", + "@types/eslint-plugin-jsx-a11y": "^6.10.0", + "@types/js-cookie": "^3.0.6", + "@types/leaflet": "^1.9.20", + "@types/node": "^24.2.0", + "@types/nodemailer": "^6.4.17", + "@types/nodemailer-html-to-text": "^3.1.3", + "@types/pg": "^8.15.5", + "@types/react": "^19.1.8", + "@types/react-dom": "^19.1.7", + "@types/react-is": "^19.0.0", + "@types/uuid": "^10.0.0", + "@typescript-eslint/eslint-plugin": "^8.39.0", + "@typescript-eslint/parser": "^8.39.0", + "cross-env": "^10.0.0", + "eslint": "^9.32.0", + "eslint-config-next": "^15.4.5", + "eslint-import-resolver-typescript": "^4.4.4", + "eslint-plugin-better-tailwindcss": "^3.7.4", + "eslint-plugin-import": "^2.32.0", + "eslint-plugin-no-relative-import-paths": "^1.6.1", + "eslint-plugin-react": "^7.37.5", + "eslint-plugin-react-hooks": "^5.2.0", + "jiti": "^2.5.1", + "kanel": "^3.14.2", + "kanel-kysely": "^0.7.1", + "knip": "^5.62.0", + "npm-run-all": "^4.1.5", + "prettier": "^3.6.2", + "prettier-plugin-classnames": "^0.8.2", + "prettier-plugin-tailwindcss": "^0.6.14", + "typescript": "^5.9.2", + "typescript-eslint": "^8.39.0" + }, + "ct3aMetadata": { + "initVersion": "7.9.0" + } +}