diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b824c3330b..9fffd80462 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,7 @@ name: build on: pull_request: - types: [ opened, reopened, synchronize ] + types: [opened, reopened, synchronize] push: branches: ['main', 'alpha'] @@ -124,7 +124,7 @@ jobs: fail-fast: false matrix: database: - - mongodb + - mongodb # - postgres # - postgres-custom-schema # - postgres-uuid @@ -162,7 +162,7 @@ jobs: - name: Start PostgreSQL uses: CasperWA/postgresql-action@v1.2 with: - postgresql version: '14' # See https://hub.docker.com/_/postgres for available versions + postgresql version: '14' # See https://hub.docker.com/_/postgres for available versions postgresql db: ${{ env.POSTGRES_DB }} postgresql user: ${{ env.POSTGRES_USER }} postgresql password: ${{ env.POSTGRES_PASSWORD }} @@ -344,7 +344,7 @@ jobs: strategy: fail-fast: false matrix: - template: [ blank, website, ecommerce ] + template: [blank, website, ecommerce] steps: - uses: actions/checkout@v4 diff --git a/examples/email/package.json b/examples/email/package.json index e0cf5ab600..80f1dbfe7b 100644 --- a/examples/email/package.json +++ b/examples/email/package.json @@ -32,4 +32,4 @@ "ts-node": "^9.1.1", "typescript": "^4.8.4" } -} \ No newline at end of file +} diff --git a/examples/email/tsconfig.json b/examples/email/tsconfig.json index 7c88a339c8..d7e09b6566 100644 --- a/examples/email/tsconfig.json +++ b/examples/email/tsconfig.json @@ -1,11 +1,7 @@ { "compilerOptions": { "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "strict": false, "esModuleInterop": true, @@ -16,22 +12,12 @@ "sourceMap": true, "resolveJsonModule": true, "paths": { - "payload/generated-types": [ - "./src/payload-types.ts" - ], - "node_modules/*": [ - "./node_modules/*" - ] - }, + "payload/generated-types": ["./src/payload-types.ts"], + "node_modules/*": ["./node_modules/*"] + } }, - "include": [ - "src" - ], - "exclude": [ - "node_modules", - "dist", - "build", - ], + "include": ["src"], + "exclude": ["node_modules", "dist", "build"], "ts-node": { "transpileOnly": true } diff --git a/examples/testing/tsconfig.json b/examples/testing/tsconfig.json index 9ce47227fb..1e010f9523 100644 --- a/examples/testing/tsconfig.json +++ b/examples/testing/tsconfig.json @@ -1,11 +1,7 @@ { "compilerOptions": { "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "outDir": "./dist", "skipLibCheck": true, "strict": false, @@ -18,10 +14,8 @@ "jsx": "preserve", "sourceMap": true }, - "include": [ - "src" - ], + "include": ["src"], "ts-node": { "transpileOnly": true } -} \ No newline at end of file +} diff --git a/examples/virtual-fields/package.json b/examples/virtual-fields/package.json index 625e6c059a..01ae262a5e 100644 --- a/examples/virtual-fields/package.json +++ b/examples/virtual-fields/package.json @@ -26,4 +26,4 @@ "ts-node": "^9.1.1", "typescript": "^4.8.4" } -} \ No newline at end of file +} diff --git a/examples/virtual-fields/tsconfig.json b/examples/virtual-fields/tsconfig.json index e71c9a0ef6..87a422cb36 100644 --- a/examples/virtual-fields/tsconfig.json +++ b/examples/virtual-fields/tsconfig.json @@ -1,11 +1,7 @@ { "compilerOptions": { "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "strict": false, "esModuleInterop": true, @@ -14,14 +10,8 @@ "rootDir": "./src", "jsx": "react" }, - "include": [ - "src", - ], - "exclude": [ - "node_modules", - "dist", - "build", - ], + "include": ["src"], + "exclude": ["node_modules", "dist", "build"], "ts-node": { "transpileOnly": true } diff --git a/examples/whitelabel/package.json b/examples/whitelabel/package.json index 56fcad5af5..3392349473 100644 --- a/examples/whitelabel/package.json +++ b/examples/whitelabel/package.json @@ -26,4 +26,4 @@ "ts-node": "^9.1.1", "typescript": "^4.8.4" } -} \ No newline at end of file +} diff --git a/examples/whitelabel/tsconfig.json b/examples/whitelabel/tsconfig.json index 4a26b312af..87a422cb36 100644 --- a/examples/whitelabel/tsconfig.json +++ b/examples/whitelabel/tsconfig.json @@ -1,11 +1,7 @@ { "compilerOptions": { "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "strict": false, "esModuleInterop": true, @@ -14,14 +10,8 @@ "rootDir": "./src", "jsx": "react" }, - "include": [ - "src" - ], - "exclude": [ - "node_modules", - "dist", - "build", - ], + "include": ["src"], + "exclude": ["node_modules", "dist", "build"], "ts-node": { "transpileOnly": true } diff --git a/package.json b/package.json index 7556b6f5d8..dc8b8646d4 100644 --- a/package.json +++ b/package.json @@ -167,6 +167,7 @@ "pnpm": ">=8" }, "lint-staged": { + "*.{md,yml,json}": "prettier --write", "*.{js,jsx,ts,tsx}": [ "prettier --write", "eslint --cache --fix" diff --git a/templates/ecommerce/tsconfig.json b/templates/ecommerce/tsconfig.json index 69a9a86789..50b26fa284 100644 --- a/templates/ecommerce/tsconfig.json +++ b/templates/ecommerce/tsconfig.json @@ -2,11 +2,7 @@ "compilerOptions": { "esModuleInterop": true, "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": false, @@ -24,17 +20,11 @@ } ], "paths": { - "react": ["./node_modules/@types/react"], + "react": ["./node_modules/@types/react"] } }, - "include": [ - "**/*.ts", - "**/*.tsx", - ".next/types/**/*.ts" - ], - "exclude": [ - "node_modules" - ], + "include": ["**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"], "ts-node": { "transpileOnly": true, "swc": true diff --git a/templates/website/tsconfig.json b/templates/website/tsconfig.json index c924c45116..9b8227bc0f 100644 --- a/templates/website/tsconfig.json +++ b/templates/website/tsconfig.json @@ -2,11 +2,7 @@ "compilerOptions": { "esModuleInterop": true, "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": false, @@ -25,17 +21,11 @@ } ], "paths": { - "react": ["./node_modules/@types/react"], + "react": ["./node_modules/@types/react"] } }, - "include": [ - "**/*.ts", - "**/*.tsx", - ".next/types/**/*.ts" - ], - "exclude": [ - "node_modules" - ], + "include": ["**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"], "ts-node": { "transpileOnly": true, "swc": true diff --git a/test/tsconfig.json b/test/tsconfig.json index 3e23bb1597..97e889a126 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -12,20 +12,12 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "jsx": "preserve", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, "strict": false, - "types": [ - "jest", - "node", - "@types/jest" - ], + "types": ["jest", "node", "@types/jest"], "incremental": true, "isolatedModules": true, "plugins": [ @@ -34,55 +26,21 @@ } ], "paths": { - "@payloadcms/ui/assets": [ - "./packages/ui/src/assets/index.ts" - ], - "@payloadcms/ui/elements/*": [ - "./packages/ui/src/elements/*/index.tsx" - ], - "@payloadcms/ui/fields/*": [ - "./packages/ui/src/fields/*/index.tsx" - ], - "@payloadcms/ui/forms/*": [ - "./packages/ui/src/forms/*/index.tsx" - ], - "@payloadcms/ui/graphics/*": [ - "./packages/ui/src/graphics/*/index.tsx" - ], - "@payloadcms/ui/hooks/*": [ - "./packages/ui/src/hooks/*.ts" - ], - "@payloadcms/ui/icons/*": [ - "./packages/ui/src/icons/*/index.tsx" - ], - "@payloadcms/ui/providers/*": [ - "./packages/ui/src/providers/*/index.tsx" - ], - "@payloadcms/ui/templates/*": [ - "./packages/ui/src/templates/*/index.tsx" - ], - "@payloadcms/ui/utilities/*": [ - "./packages/ui/src/utilities/*.ts" - ], - "@payloadcms/ui/scss": [ - "./packages/ui/src/scss.scss" - ], - "@payloadcms/ui/scss/app.scss": [ - "./packages/ui/src/scss/app.scss" - ] + "@payloadcms/ui/assets": ["./packages/ui/src/assets/index.ts"], + "@payloadcms/ui/elements/*": ["./packages/ui/src/elements/*/index.tsx"], + "@payloadcms/ui/fields/*": ["./packages/ui/src/fields/*/index.tsx"], + "@payloadcms/ui/forms/*": ["./packages/ui/src/forms/*/index.tsx"], + "@payloadcms/ui/graphics/*": ["./packages/ui/src/graphics/*/index.tsx"], + "@payloadcms/ui/hooks/*": ["./packages/ui/src/hooks/*.ts"], + "@payloadcms/ui/icons/*": ["./packages/ui/src/icons/*/index.tsx"], + "@payloadcms/ui/providers/*": ["./packages/ui/src/providers/*/index.tsx"], + "@payloadcms/ui/templates/*": ["./packages/ui/src/templates/*/index.tsx"], + "@payloadcms/ui/utilities/*": ["./packages/ui/src/utilities/*.ts"], + "@payloadcms/ui/scss": ["./packages/ui/src/scss.scss"], + "@payloadcms/ui/scss/app.scss": ["./packages/ui/src/scss/app.scss"] } }, - "exclude": [ - "dist", - "build", - "node_modules", - ".eslintrc.js", - "dist/**/*.js", - "**/dist/**/*.js" - ], - "include": [ - "./**/*.ts", - ".next/types/**/*.ts" - ], + "exclude": ["dist", "build", "node_modules", ".eslintrc.js", "dist/**/*.js", "**/dist/**/*.js"], + "include": ["./**/*.ts", ".next/types/**/*.ts"], "references": [] } diff --git a/tsconfig.json b/tsconfig.json index 51ba1562d6..7062457954 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,11 +11,7 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "jsx": "preserve", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "noEmit": true, "outDir": "./dist", "resolveJsonModule": true, @@ -23,11 +19,7 @@ "skipLibCheck": true, "sourceMap": true, "strict": false, - "types": [ - "jest", - "node", - "@types/jest" - ], + "types": ["jest", "node", "@types/jest"], "incremental": true, "isolatedModules": true, "plugins": [ @@ -36,65 +28,26 @@ } ], "paths": { - "@payload-config": [ - "./test/_community/config.ts" - ], - "@payloadcms/live-preview": [ - "./packages/live-preview/src" - ], - "@payloadcms/live-preview-react": [ - "./packages/live-preview-react/src/index.ts" - ], - "@payloadcms/ui/assets": [ - "./packages/ui/src/assets/index.ts" - ], - "@payloadcms/ui/elements/*": [ - "./packages/ui/src/elements/*/index.tsx" - ], - "@payloadcms/ui/fields/*": [ - "./packages/ui/src/fields/*/index.tsx" - ], - "@payloadcms/ui/forms/*": [ - "./packages/ui/src/forms/*/index.tsx" - ], - "@payloadcms/ui/graphics/*": [ - "./packages/ui/src/graphics/*/index.tsx" - ], - "@payloadcms/ui/hooks/*": [ - "./packages/ui/src/hooks/*.ts" - ], - "@payloadcms/ui/icons/*": [ - "./packages/ui/src/icons/*/index.tsx" - ], - "@payloadcms/ui/providers/*": [ - "./packages/ui/src/providers/*/index.tsx" - ], - "@payloadcms/ui/templates/*": [ - "./packages/ui/src/templates/*/index.tsx" - ], - "@payloadcms/ui/utilities/*": [ - "./packages/ui/src/utilities/*.ts" - ], - "@payloadcms/ui/scss": [ - "./packages/ui/src/scss.scss" - ], - "@payloadcms/ui/scss/app.scss": [ - "./packages/ui/src/scss/app.scss" - ], - "@payloadcms/next/*": [ - "./packages/next/src/*" - ], - "@payloadcms/next": [ - "./packages/next/src/exports/*" - ] + "@payload-config": ["./test/_community/config.ts"], + "@payloadcms/live-preview": ["./packages/live-preview/src"], + "@payloadcms/live-preview-react": ["./packages/live-preview-react/src/index.ts"], + "@payloadcms/ui/assets": ["./packages/ui/src/assets/index.ts"], + "@payloadcms/ui/elements/*": ["./packages/ui/src/elements/*/index.tsx"], + "@payloadcms/ui/fields/*": ["./packages/ui/src/fields/*/index.tsx"], + "@payloadcms/ui/forms/*": ["./packages/ui/src/forms/*/index.tsx"], + "@payloadcms/ui/graphics/*": ["./packages/ui/src/graphics/*/index.tsx"], + "@payloadcms/ui/hooks/*": ["./packages/ui/src/hooks/*.ts"], + "@payloadcms/ui/icons/*": ["./packages/ui/src/icons/*/index.tsx"], + "@payloadcms/ui/providers/*": ["./packages/ui/src/providers/*/index.tsx"], + "@payloadcms/ui/templates/*": ["./packages/ui/src/templates/*/index.tsx"], + "@payloadcms/ui/utilities/*": ["./packages/ui/src/utilities/*.ts"], + "@payloadcms/ui/scss": ["./packages/ui/src/scss.scss"], + "@payloadcms/ui/scss/app.scss": ["./packages/ui/src/scss/app.scss"], + "@payloadcms/next/*": ["./packages/next/src/*"], + "@payloadcms/next": ["./packages/next/src/exports/*"] } }, - "exclude": [ - "dist", - "build", - "temp", - "node_modules" - ], + "exclude": ["dist", "build", "temp", "node_modules"], "composite": true, "references": [ { @@ -155,9 +108,5 @@ "path": "./packages/ui" } ], - "include": [ - "next-env.d.ts", - ".next/types/**/*.ts", - "scripts/**/*.ts" - ] + "include": ["next-env.d.ts", ".next/types/**/*.ts", "scripts/**/*.ts"] }