chore: lint all json/yml, add to lint-staged
This commit is contained in:
8
.github/workflows/main.yml
vendored
8
.github/workflows/main.yml
vendored
@@ -2,7 +2,7 @@ name: build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [ opened, reopened, synchronize ]
|
types: [opened, reopened, synchronize]
|
||||||
push:
|
push:
|
||||||
branches: ['main', 'alpha']
|
branches: ['main', 'alpha']
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
database:
|
database:
|
||||||
- mongodb
|
- mongodb
|
||||||
# - postgres
|
# - postgres
|
||||||
# - postgres-custom-schema
|
# - postgres-custom-schema
|
||||||
# - postgres-uuid
|
# - postgres-uuid
|
||||||
@@ -162,7 +162,7 @@ jobs:
|
|||||||
- name: Start PostgreSQL
|
- name: Start PostgreSQL
|
||||||
uses: CasperWA/postgresql-action@v1.2
|
uses: CasperWA/postgresql-action@v1.2
|
||||||
with:
|
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 db: ${{ env.POSTGRES_DB }}
|
||||||
postgresql user: ${{ env.POSTGRES_USER }}
|
postgresql user: ${{ env.POSTGRES_USER }}
|
||||||
postgresql password: ${{ env.POSTGRES_PASSWORD }}
|
postgresql password: ${{ env.POSTGRES_PASSWORD }}
|
||||||
@@ -344,7 +344,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
template: [ blank, website, ecommerce ]
|
template: [blank, website, ecommerce]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -32,4 +32,4 @@
|
|||||||
"ts-node": "^9.1.1",
|
"ts-node": "^9.1.1",
|
||||||
"typescript": "^4.8.4"
|
"typescript": "^4.8.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"dom",
|
|
||||||
"dom.iterable",
|
|
||||||
"esnext"
|
|
||||||
],
|
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
@@ -16,22 +12,12 @@
|
|||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"payload/generated-types": [
|
"payload/generated-types": ["./src/payload-types.ts"],
|
||||||
"./src/payload-types.ts"
|
"node_modules/*": ["./node_modules/*"]
|
||||||
],
|
}
|
||||||
"node_modules/*": [
|
|
||||||
"./node_modules/*"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["src"],
|
||||||
"src"
|
"exclude": ["node_modules", "dist", "build"],
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"node_modules",
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
],
|
|
||||||
"ts-node": {
|
"ts-node": {
|
||||||
"transpileOnly": true
|
"transpileOnly": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"dom",
|
|
||||||
"dom.iterable",
|
|
||||||
"esnext"
|
|
||||||
],
|
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"strict": false,
|
"strict": false,
|
||||||
@@ -18,10 +14,8 @@
|
|||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"sourceMap": true
|
"sourceMap": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["src"],
|
||||||
"src"
|
|
||||||
],
|
|
||||||
"ts-node": {
|
"ts-node": {
|
||||||
"transpileOnly": true
|
"transpileOnly": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,4 +26,4 @@
|
|||||||
"ts-node": "^9.1.1",
|
"ts-node": "^9.1.1",
|
||||||
"typescript": "^4.8.4"
|
"typescript": "^4.8.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"dom",
|
|
||||||
"dom.iterable",
|
|
||||||
"esnext"
|
|
||||||
],
|
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
@@ -14,14 +10,8 @@
|
|||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"jsx": "react"
|
"jsx": "react"
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["src"],
|
||||||
"src",
|
"exclude": ["node_modules", "dist", "build"],
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"node_modules",
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
],
|
|
||||||
"ts-node": {
|
"ts-node": {
|
||||||
"transpileOnly": true
|
"transpileOnly": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,4 +26,4 @@
|
|||||||
"ts-node": "^9.1.1",
|
"ts-node": "^9.1.1",
|
||||||
"typescript": "^4.8.4"
|
"typescript": "^4.8.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"dom",
|
|
||||||
"dom.iterable",
|
|
||||||
"esnext"
|
|
||||||
],
|
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
@@ -14,14 +10,8 @@
|
|||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"jsx": "react"
|
"jsx": "react"
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["src"],
|
||||||
"src"
|
"exclude": ["node_modules", "dist", "build"],
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"node_modules",
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
],
|
|
||||||
"ts-node": {
|
"ts-node": {
|
||||||
"transpileOnly": true
|
"transpileOnly": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,6 +167,7 @@
|
|||||||
"pnpm": ">=8"
|
"pnpm": ">=8"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
|
"*.{md,yml,json}": "prettier --write",
|
||||||
"*.{js,jsx,ts,tsx}": [
|
"*.{js,jsx,ts,tsx}": [
|
||||||
"prettier --write",
|
"prettier --write",
|
||||||
"eslint --cache --fix"
|
"eslint --cache --fix"
|
||||||
|
|||||||
@@ -2,11 +2,7 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"dom",
|
|
||||||
"dom.iterable",
|
|
||||||
"esnext"
|
|
||||||
],
|
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"strict": false,
|
"strict": false,
|
||||||
@@ -24,17 +20,11 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"react": ["./node_modules/@types/react"],
|
"react": ["./node_modules/@types/react"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||||
"**/*.ts",
|
"exclude": ["node_modules"],
|
||||||
"**/*.tsx",
|
|
||||||
".next/types/**/*.ts"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"node_modules"
|
|
||||||
],
|
|
||||||
"ts-node": {
|
"ts-node": {
|
||||||
"transpileOnly": true,
|
"transpileOnly": true,
|
||||||
"swc": true
|
"swc": true
|
||||||
|
|||||||
@@ -2,11 +2,7 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"dom",
|
|
||||||
"dom.iterable",
|
|
||||||
"esnext"
|
|
||||||
],
|
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"strict": false,
|
"strict": false,
|
||||||
@@ -25,17 +21,11 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"react": ["./node_modules/@types/react"],
|
"react": ["./node_modules/@types/react"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||||
"**/*.ts",
|
"exclude": ["node_modules"],
|
||||||
"**/*.tsx",
|
|
||||||
".next/types/**/*.ts"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"node_modules"
|
|
||||||
],
|
|
||||||
"ts-node": {
|
"ts-node": {
|
||||||
"transpileOnly": true,
|
"transpileOnly": true,
|
||||||
"swc": true
|
"swc": true
|
||||||
|
|||||||
@@ -12,20 +12,12 @@
|
|||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"lib": [
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"dom",
|
|
||||||
"dom.iterable",
|
|
||||||
"esnext"
|
|
||||||
],
|
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"types": [
|
"types": ["jest", "node", "@types/jest"],
|
||||||
"jest",
|
|
||||||
"node",
|
|
||||||
"@types/jest"
|
|
||||||
],
|
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"plugins": [
|
"plugins": [
|
||||||
@@ -34,55 +26,21 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"@payloadcms/ui/assets": [
|
"@payloadcms/ui/assets": ["./packages/ui/src/assets/index.ts"],
|
||||||
"./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/elements/*": [
|
"@payloadcms/ui/forms/*": ["./packages/ui/src/forms/*/index.tsx"],
|
||||||
"./packages/ui/src/elements/*/index.tsx"
|
"@payloadcms/ui/graphics/*": ["./packages/ui/src/graphics/*/index.tsx"],
|
||||||
],
|
"@payloadcms/ui/hooks/*": ["./packages/ui/src/hooks/*.ts"],
|
||||||
"@payloadcms/ui/fields/*": [
|
"@payloadcms/ui/icons/*": ["./packages/ui/src/icons/*/index.tsx"],
|
||||||
"./packages/ui/src/fields/*/index.tsx"
|
"@payloadcms/ui/providers/*": ["./packages/ui/src/providers/*/index.tsx"],
|
||||||
],
|
"@payloadcms/ui/templates/*": ["./packages/ui/src/templates/*/index.tsx"],
|
||||||
"@payloadcms/ui/forms/*": [
|
"@payloadcms/ui/utilities/*": ["./packages/ui/src/utilities/*.ts"],
|
||||||
"./packages/ui/src/forms/*/index.tsx"
|
"@payloadcms/ui/scss": ["./packages/ui/src/scss.scss"],
|
||||||
],
|
"@payloadcms/ui/scss/app.scss": ["./packages/ui/src/scss/app.scss"]
|
||||||
"@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": [
|
"exclude": ["dist", "build", "node_modules", ".eslintrc.js", "dist/**/*.js", "**/dist/**/*.js"],
|
||||||
"dist",
|
"include": ["./**/*.ts", ".next/types/**/*.ts"],
|
||||||
"build",
|
|
||||||
"node_modules",
|
|
||||||
".eslintrc.js",
|
|
||||||
"dist/**/*.js",
|
|
||||||
"**/dist/**/*.js"
|
|
||||||
],
|
|
||||||
"include": [
|
|
||||||
"./**/*.ts",
|
|
||||||
".next/types/**/*.ts"
|
|
||||||
],
|
|
||||||
"references": []
|
"references": []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,11 +11,7 @@
|
|||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"lib": [
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"dom",
|
|
||||||
"dom.iterable",
|
|
||||||
"esnext"
|
|
||||||
],
|
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
@@ -23,11 +19,7 @@
|
|||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"types": [
|
"types": ["jest", "node", "@types/jest"],
|
||||||
"jest",
|
|
||||||
"node",
|
|
||||||
"@types/jest"
|
|
||||||
],
|
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"plugins": [
|
"plugins": [
|
||||||
@@ -36,65 +28,26 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"@payload-config": [
|
"@payload-config": ["./test/_community/config.ts"],
|
||||||
"./test/_community/config.ts"
|
"@payloadcms/live-preview": ["./packages/live-preview/src"],
|
||||||
],
|
"@payloadcms/live-preview-react": ["./packages/live-preview-react/src/index.ts"],
|
||||||
"@payloadcms/live-preview": [
|
"@payloadcms/ui/assets": ["./packages/ui/src/assets/index.ts"],
|
||||||
"./packages/live-preview/src"
|
"@payloadcms/ui/elements/*": ["./packages/ui/src/elements/*/index.tsx"],
|
||||||
],
|
"@payloadcms/ui/fields/*": ["./packages/ui/src/fields/*/index.tsx"],
|
||||||
"@payloadcms/live-preview-react": [
|
"@payloadcms/ui/forms/*": ["./packages/ui/src/forms/*/index.tsx"],
|
||||||
"./packages/live-preview-react/src/index.ts"
|
"@payloadcms/ui/graphics/*": ["./packages/ui/src/graphics/*/index.tsx"],
|
||||||
],
|
"@payloadcms/ui/hooks/*": ["./packages/ui/src/hooks/*.ts"],
|
||||||
"@payloadcms/ui/assets": [
|
"@payloadcms/ui/icons/*": ["./packages/ui/src/icons/*/index.tsx"],
|
||||||
"./packages/ui/src/assets/index.ts"
|
"@payloadcms/ui/providers/*": ["./packages/ui/src/providers/*/index.tsx"],
|
||||||
],
|
"@payloadcms/ui/templates/*": ["./packages/ui/src/templates/*/index.tsx"],
|
||||||
"@payloadcms/ui/elements/*": [
|
"@payloadcms/ui/utilities/*": ["./packages/ui/src/utilities/*.ts"],
|
||||||
"./packages/ui/src/elements/*/index.tsx"
|
"@payloadcms/ui/scss": ["./packages/ui/src/scss.scss"],
|
||||||
],
|
"@payloadcms/ui/scss/app.scss": ["./packages/ui/src/scss/app.scss"],
|
||||||
"@payloadcms/ui/fields/*": [
|
"@payloadcms/next/*": ["./packages/next/src/*"],
|
||||||
"./packages/ui/src/fields/*/index.tsx"
|
"@payloadcms/next": ["./packages/next/src/exports/*"]
|
||||||
],
|
|
||||||
"@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": [
|
"exclude": ["dist", "build", "temp", "node_modules"],
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"temp",
|
|
||||||
"node_modules"
|
|
||||||
],
|
|
||||||
"composite": true,
|
"composite": true,
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
@@ -155,9 +108,5 @@
|
|||||||
"path": "./packages/ui"
|
"path": "./packages/ui"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"include": [
|
"include": ["next-env.d.ts", ".next/types/**/*.ts", "scripts/**/*.ts"]
|
||||||
"next-env.d.ts",
|
|
||||||
".next/types/**/*.ts",
|
|
||||||
"scripts/**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user