From 6f9cf22fa80b77fcacb86541db64fc0294abb89a Mon Sep 17 00:00:00 2001 From: Giancarlo Buomprisco Date: Fri, 7 Feb 2025 10:38:29 +0700 Subject: [PATCH] EsLint v9 (#154) * Upgrade ESLint and related configurations to version 9 - Update ESLint to version 9.19.0 - Migrate ESLint configurations to flat config format - Remove deprecated ESLint config files - Update package dependencies and configurations - Simplify ESLint setup across packages - Remove unnecessary ESLint config blocks from package.json files - Improved CI caching with Turborepo tasks - Removed duplicate styles --- .github/workflows/workflow.yml | 17 +- README.md | 8 +- .../blog/_components/cover-image.tsx | 2 +- .../blog/_components/post-header.tsx | 4 +- .../app/(marketing)/docs/[...slug]/page.tsx | 4 +- .../docs/_components/docs-page-link.tsx | 4 +- .../_components/floating-docs-navigation.tsx | 6 +- .../home/[account]/billing/return/page.tsx | 4 +- apps/web/app/join/page.tsx | 2 +- apps/web/eslint.config.mjs | 4 + apps/web/package.json | 8 +- apps/web/postcss.config.cjs | 2 - .../postcss.js => apps/web/postcss.config.mjs | 2 +- apps/web/styles/globals.css | 162 --- apps/web/styles/theme.css | 27 +- apps/web/tsconfig.json | 1 - package.json | 6 +- packages/analytics/eslint.config.mjs | 3 + packages/analytics/package.json | 7 - .../analytics/src/null-analytics-service.ts | 1 - packages/billing/core/eslint.config.mjs | 3 + packages/billing/core/package.json | 8 - packages/billing/gateway/eslint.config.mjs | 3 + packages/billing/gateway/package.json | 10 +- .../gateway/src/components/pricing-table.tsx | 2 +- .../billing/lemon-squeezy/eslint.config.mjs | 3 + packages/billing/lemon-squeezy/package.json | 8 - packages/billing/stripe/eslint.config.mjs | 3 + packages/billing/stripe/package.json | 8 - packages/cms/core/eslint.config.mjs | 3 + packages/cms/core/package.json | 7 - packages/cms/keystatic/eslint.config.mjs | 3 + packages/cms/keystatic/package.json | 9 +- packages/cms/types/eslint.config.mjs | 3 + packages/cms/types/package.json | 9 +- packages/cms/wordpress/eslint.config.mjs | 3 + packages/cms/wordpress/package.json | 9 +- packages/cms/wordpress/src/wp-client.ts | 5 +- packages/database-webhooks/eslint.config.mjs | 3 + packages/database-webhooks/package.json | 9 +- .../database-webhook-handler.service.ts | 20 +- packages/email-templates/eslint.config.mjs | 3 + packages/email-templates/package.json | 8 - packages/features/accounts/eslint.config.mjs | 3 + packages/features/accounts/package.json | 8 - .../password/update-password-form.tsx | 1 - packages/features/admin/eslint.config.mjs | 3 + packages/features/admin/package.json | 8 - packages/features/auth/eslint.config.mjs | 3 + packages/features/auth/package.json | 8 - .../features/notifications/eslint.config.mjs | 3 + packages/features/notifications/package.json | 1 - .../features/team-accounts/eslint.config.mjs | 3 + packages/features/team-accounts/package.json | 8 - packages/i18n/eslint.config.mjs | 3 + packages/i18n/package.json | 7 - packages/mailers/core/eslint.config.mjs | 3 + packages/mailers/core/package.json | 7 - packages/mailers/nodemailer/eslint.config.mjs | 3 + packages/mailers/nodemailer/package.json | 7 - packages/mailers/resend/eslint.config.mjs | 3 + packages/mailers/resend/package.json | 7 - packages/mailers/shared/eslint.config.mjs | 3 + packages/mailers/shared/package.json | 7 - packages/monitoring/api/eslint.config.mjs | 3 + packages/monitoring/api/package.json | 7 - .../monitoring/baselime/eslint.config.mjs | 3 + packages/monitoring/baselime/package.json | 7 - packages/monitoring/core/eslint.config.mjs | 3 + packages/monitoring/core/package.json | 7 - packages/monitoring/sentry/eslint.config.mjs | 3 + packages/monitoring/sentry/package.json | 7 - packages/next/eslint.config.mjs | 3 + packages/next/package.json | 7 - packages/shared/eslint.config.mjs | 3 + packages/shared/package.json | 7 - packages/shared/src/registry/index.ts | 10 +- packages/supabase/eslint.config.mjs | 3 + packages/supabase/package.json | 8 - packages/ui/eslint.config.mjs | 3 + packages/ui/package.json | 52 +- packages/ui/src/makerkit/cookie-banner.tsx | 2 +- packages/ui/src/makerkit/global-loader.tsx | 2 +- packages/ui/src/makerkit/image-uploader.tsx | 6 +- .../ui/src/makerkit/marketing/coming-soon.tsx | 4 +- .../ui/src/makerkit/marketing/cta-button.tsx | 2 +- .../src/makerkit/marketing/secondary-hero.tsx | 2 +- packages/ui/src/makerkit/page.tsx | 5 +- packages/ui/src/makerkit/profile-avatar.tsx | 2 +- packages/ui/src/makerkit/spinner.tsx | 2 +- packages/ui/src/shadcn/accordion.tsx | 6 +- packages/ui/src/shadcn/avatar.tsx | 2 +- packages/ui/src/shadcn/breadcrumb.tsx | 4 +- packages/ui/src/shadcn/card.tsx | 6 +- packages/ui/src/shadcn/chart.tsx | 4 +- packages/ui/src/shadcn/command.tsx | 1 - packages/ui/src/shadcn/heading.tsx | 12 +- packages/ui/src/shadcn/label.tsx | 2 +- packages/ui/src/shadcn/progress.tsx | 4 +- packages/ui/src/shadcn/scroll-area.tsx | 4 +- packages/ui/src/shadcn/separator.tsx | 2 +- packages/ui/src/shadcn/skeleton.tsx | 2 +- packages/ui/src/shadcn/tooltip.tsx | 2 +- pnpm-lock.yaml | 1273 +++++++++-------- tooling/eslint/apps.js | 47 +- tooling/eslint/base.js | 153 +- tooling/eslint/eslint.config.mjs | 3 + tooling/eslint/nextjs.js | 23 +- tooling/eslint/package.json | 26 +- tooling/eslint/react.js | 20 - tooling/eslint/tsconfig.json | 8 - tooling/tailwind/package.json | 34 - tooling/tailwind/tsconfig.json | 8 - 113 files changed, 1040 insertions(+), 1284 deletions(-) create mode 100644 apps/web/eslint.config.mjs delete mode 100644 apps/web/postcss.config.cjs rename tooling/tailwind/postcss.js => apps/web/postcss.config.mjs (73%) create mode 100644 packages/analytics/eslint.config.mjs create mode 100644 packages/billing/core/eslint.config.mjs create mode 100644 packages/billing/gateway/eslint.config.mjs create mode 100644 packages/billing/lemon-squeezy/eslint.config.mjs create mode 100644 packages/billing/stripe/eslint.config.mjs create mode 100644 packages/cms/core/eslint.config.mjs create mode 100644 packages/cms/keystatic/eslint.config.mjs create mode 100644 packages/cms/types/eslint.config.mjs create mode 100644 packages/cms/wordpress/eslint.config.mjs create mode 100644 packages/database-webhooks/eslint.config.mjs create mode 100644 packages/email-templates/eslint.config.mjs create mode 100644 packages/features/accounts/eslint.config.mjs create mode 100644 packages/features/admin/eslint.config.mjs create mode 100644 packages/features/auth/eslint.config.mjs create mode 100644 packages/features/notifications/eslint.config.mjs create mode 100644 packages/features/team-accounts/eslint.config.mjs create mode 100644 packages/i18n/eslint.config.mjs create mode 100644 packages/mailers/core/eslint.config.mjs create mode 100644 packages/mailers/nodemailer/eslint.config.mjs create mode 100644 packages/mailers/resend/eslint.config.mjs create mode 100644 packages/mailers/shared/eslint.config.mjs create mode 100644 packages/monitoring/api/eslint.config.mjs create mode 100644 packages/monitoring/baselime/eslint.config.mjs create mode 100644 packages/monitoring/core/eslint.config.mjs create mode 100644 packages/monitoring/sentry/eslint.config.mjs create mode 100644 packages/next/eslint.config.mjs create mode 100644 packages/shared/eslint.config.mjs create mode 100644 packages/supabase/eslint.config.mjs create mode 100644 packages/ui/eslint.config.mjs create mode 100644 tooling/eslint/eslint.config.mjs delete mode 100644 tooling/eslint/react.js delete mode 100644 tooling/eslint/tsconfig.json delete mode 100644 tooling/tailwind/package.json delete mode 100644 tooling/tailwind/tsconfig.json diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 67ce32782..5d8b97774 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -7,13 +7,14 @@ on: jobs: typescript: name: ĘŚ TypeScript - timeout-minutes: 8 + timeout-minutes: 10 runs-on: ubuntu-latest env: SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} SUPABASE_DB_WEBHOOK_SECRET: ${{ secrets.SUPABASE_DB_WEBHOOK_SECRET }} STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }} STRIPE_WEBHOOK_SECRET: ${{ secrets.STRIPE_WEBHOOK_SECRET }} + DO_NOT_TRACK: 1 steps: - uses: actions/checkout@v4 @@ -27,6 +28,9 @@ jobs: node-version: lts/* cache: 'pnpm' + - name: Install dependencies + run: pnpm install + - uses: actions/cache@v4 with: path: .turbo @@ -34,9 +38,6 @@ jobs: restore-keys: | ${{ runner.os }}-turbo- - - name: Install dependencies - run: pnpm install - - name: Typecheck run: pnpm run typecheck @@ -54,6 +55,7 @@ jobs: STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }} STRIPE_WEBHOOK_SECRET: ${{ secrets.STRIPE_WEBHOOK_SECRET }} ENABLE_BILLING_TESTS: ${{ vars.ENABLE_BILLING_TESTS }} + DO_NOT_TRACK: 1 steps: - uses: actions/checkout@v4 @@ -62,13 +64,6 @@ jobs: - uses: pnpm/action-setup@v4 - - uses: actions/cache@v4 - with: - path: .turbo - key: ${{ runner.os }}-turbo-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-turbo- - - uses: actions/setup-node@v4 with: node-version: lts/* diff --git a/README.md b/README.md index 202cf5658..6722ab440 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,8 @@ This is a Starter Kit for building SaaS applications using Supabase, Next.js, and Tailwind CSS. -This version uses Turborepo to manage multiple packages in a single repository. - -**This project is stable but still under development. Please update the repository daily**. - A demo version of this project can be found at [makerkit/next-supabase-saas-kit-turbo-demo](https://github.com/makerkit/next-supabase-saas-kit-turbo-demo). This version contains a tasks functionality that is not present in the original version, multiple languages, and other various modifications. -[Please follow the documentation to get started](https://makerkit.dev/docs/next-supabase-turbo/introduction). \ No newline at end of file +[Please follow the documentation to get started](https://makerkit.dev/docs/next-supabase-turbo/introduction). + +**Please remember to update the repository daily**. \ No newline at end of file diff --git a/apps/web/app/(marketing)/blog/_components/cover-image.tsx b/apps/web/app/(marketing)/blog/_components/cover-image.tsx index 342634f62..26592dc84 100644 --- a/apps/web/app/(marketing)/blog/_components/cover-image.tsx +++ b/apps/web/app/(marketing)/blog/_components/cover-image.tsx @@ -13,7 +13,7 @@ export function CoverImage({ title, src, preloadImage, className }: Props) { return (

{title} @@ -27,7 +27,7 @@ export function PostHeader({ post }: { post: Cms.ContentItem }) {

diff --git a/apps/web/app/(marketing)/docs/[...slug]/page.tsx b/apps/web/app/(marketing)/docs/[...slug]/page.tsx index 4a83526e1..c18994743 100644 --- a/apps/web/app/(marketing)/docs/[...slug]/page.tsx +++ b/apps/web/app/(marketing)/docs/[...slug]/page.tsx @@ -63,7 +63,9 @@ async function DocumentationPage({ params }: DocumentationPageProps) {
-

{page.title}

+

+ {page.title} +

{description}

diff --git a/apps/web/app/(marketing)/docs/_components/docs-page-link.tsx b/apps/web/app/(marketing)/docs/_components/docs-page-link.tsx index 8fb42fd57..52cdad12c 100644 --- a/apps/web/app/(marketing)/docs/_components/docs-page-link.tsx +++ b/apps/web/app/(marketing)/docs/_components/docs-page-link.tsx @@ -18,7 +18,7 @@ export function DocsPageLink({ return ( {before ? `Previous` : ``} {after ? `Next` : ``} diff --git a/apps/web/app/(marketing)/docs/_components/floating-docs-navigation.tsx b/apps/web/app/(marketing)/docs/_components/floating-docs-navigation.tsx index 840d8947a..e6063a6c5 100644 --- a/apps/web/app/(marketing)/docs/_components/floating-docs-navigation.tsx +++ b/apps/web/app/(marketing)/docs/_components/floating-docs-navigation.tsx @@ -54,8 +54,8 @@ export function FloatingDocumentationNavigation(
{props.children} @@ -63,7 +63,7 @@ export function FloatingDocumentationNavigation(