chore: lint templates (#7116)
This commit is contained in:
@@ -87,6 +87,7 @@
|
||||
"prettier --write",
|
||||
"eslint --cache --fix"
|
||||
],
|
||||
"templates/website/**/*": "sh -c \"cd templates/website; pnpm install --ignore-workspace; pnpm run lint --fix\"",
|
||||
"tsconfig.json": "node scripts/reset-tsconfig.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,45 +1,8 @@
|
||||
/** @type {import('eslint').Linter.Config} */
|
||||
module.exports = {
|
||||
extends: ['plugin:@next/next/recommended', '@payloadcms'],
|
||||
ignorePatterns: ['**/payload-types.ts'],
|
||||
overrides: [
|
||||
{
|
||||
extends: ['plugin:@typescript-eslint/disable-type-checked'],
|
||||
files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'],
|
||||
},
|
||||
{
|
||||
files: ['package.json', 'tsconfig.json'],
|
||||
rules: {
|
||||
'perfectionist/sort-array-includes': 'off',
|
||||
'perfectionist/sort-astro-attributes': 'off',
|
||||
'perfectionist/sort-classes': 'off',
|
||||
'perfectionist/sort-enums': 'off',
|
||||
'perfectionist/sort-exports': 'off',
|
||||
'perfectionist/sort-imports': 'off',
|
||||
'perfectionist/sort-interfaces': 'off',
|
||||
'perfectionist/sort-jsx-props': 'off',
|
||||
'perfectionist/sort-keys': 'off',
|
||||
'perfectionist/sort-maps': 'off',
|
||||
'perfectionist/sort-named-exports': 'off',
|
||||
'perfectionist/sort-named-imports': 'off',
|
||||
'perfectionist/sort-object-types': 'off',
|
||||
'perfectionist/sort-objects': 'off',
|
||||
'perfectionist/sort-svelte-attributes': 'off',
|
||||
'perfectionist/sort-union-types': 'off',
|
||||
'perfectionist/sort-vue-attributes': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['*.ts', '*.tsx'],
|
||||
rules: {
|
||||
'perfectionist/sort-imports': 'warn',
|
||||
'perfectionist/sort-objects': 'warn',
|
||||
},
|
||||
},
|
||||
],
|
||||
extends: 'next',
|
||||
root: true,
|
||||
parserOptions: {
|
||||
project: ['./tsconfig.json'],
|
||||
tsconfigRootDir: __dirname,
|
||||
},
|
||||
root: true,
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
"dev:prod": "rm -rf .next && pnpm build && pnpm serve",
|
||||
"generate:types": "payload generate:types",
|
||||
"ii": "pnpm --ignore-workspace install",
|
||||
"lint": "eslint src",
|
||||
"lint:fix": "eslint --fix --ext .ts,.tsx src",
|
||||
"lint": "next lint",
|
||||
"lint:fix": "next lint --fix",
|
||||
"payload": "payload",
|
||||
"reinstall": "rm -rf node_modules && rm pnpm-lock.yaml && pnpm --ignore-workspace install",
|
||||
"start": "next start"
|
||||
@@ -70,6 +70,8 @@
|
||||
"@types/react": "^18.3.0",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"copyfiles": "^2.4.1",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "15.0.0-canary.58",
|
||||
"postcss": "^8.4.38",
|
||||
"prettier": "^3.0.3",
|
||||
"tailwindcss": "^3.4.3",
|
||||
|
||||
148
templates/website/pnpm-lock.yaml
generated
148
templates/website/pnpm-lock.yaml
generated
@@ -160,6 +160,12 @@ devDependencies:
|
||||
copyfiles:
|
||||
specifier: ^2.4.1
|
||||
version: 2.4.1
|
||||
eslint:
|
||||
specifier: ^8
|
||||
version: 8.48.0
|
||||
eslint-config-next:
|
||||
specifier: 15.0.0-canary.58
|
||||
version: 15.0.0-canary.58(eslint@8.48.0)(typescript@5.5.2)
|
||||
postcss:
|
||||
specifier: ^8.4.38
|
||||
version: 8.4.38
|
||||
@@ -2105,11 +2111,17 @@ packages:
|
||||
dev: false
|
||||
|
||||
/@humanwhocodes/config-array@0.11.14:
|
||||
<<<<<<< HEAD
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==,
|
||||
}
|
||||
engines: { node: '>=10.10.0' }
|
||||
=======
|
||||
resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==}
|
||||
engines: {node: '>=10.10.0'}
|
||||
deprecated: Use @eslint/config-array instead
|
||||
>>>>>>> e5ac06d30 (update deps)
|
||||
dependencies:
|
||||
'@humanwhocodes/object-schema': 2.0.3
|
||||
debug: 4.3.4
|
||||
@@ -2127,10 +2139,15 @@ packages:
|
||||
dev: true
|
||||
|
||||
/@humanwhocodes/object-schema@2.0.3:
|
||||
<<<<<<< HEAD
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==,
|
||||
}
|
||||
=======
|
||||
resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==}
|
||||
deprecated: Use @eslint/object-schema instead
|
||||
>>>>>>> e5ac06d30 (update deps)
|
||||
dev: true
|
||||
|
||||
/@img/sharp-darwin-arm64@0.33.4:
|
||||
@@ -2986,6 +3003,12 @@ packages:
|
||||
glob: 7.1.7
|
||||
dev: true
|
||||
|
||||
/@next/eslint-plugin-next@15.0.0-canary.58:
|
||||
resolution: {integrity: sha512-HZm7auvjcYm77L1PX4GBFFiSCu/CdKVdKye07cxtCOPaWEWfSsanmM/BLh415Fw2Vk/ZPMV2cxzCmDhvrKU9TQ==}
|
||||
dependencies:
|
||||
fast-glob: 3.3.1
|
||||
dev: true
|
||||
|
||||
/@next/swc-darwin-arm64@15.0.0-canary.58:
|
||||
resolution:
|
||||
{
|
||||
@@ -3219,7 +3242,7 @@ packages:
|
||||
'@typescript-eslint/parser': 6.6.0(eslint@8.48.0)(typescript@5.5.2)
|
||||
eslint: 8.48.0
|
||||
eslint-config-prettier: 9.0.0(eslint@8.48.0)
|
||||
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.6.0)(eslint@8.48.0)
|
||||
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.48.0)
|
||||
eslint-plugin-jest: 27.2.3(@typescript-eslint/eslint-plugin@6.6.0)(eslint@8.48.0)(typescript@5.5.2)
|
||||
eslint-plugin-jest-dom: 5.1.0(eslint@8.48.0)
|
||||
eslint-plugin-jsx-a11y: 6.7.1(eslint@8.48.0)
|
||||
@@ -4113,6 +4136,10 @@ packages:
|
||||
react-dom: 18.2.0(react@18.2.0)
|
||||
dev: false
|
||||
|
||||
/@rushstack/eslint-patch@1.10.3:
|
||||
resolution: {integrity: sha512-qC/xYId4NMebE6w/V33Fh9gWxLgURiNYgVNObbJl2LZv0GUUItCcCqC5axQSwRaAgaxl2mELq1rMzlswaQ0Zxg==}
|
||||
dev: true
|
||||
|
||||
/@selderee/plugin-htmlparser2@0.10.0:
|
||||
resolution:
|
||||
{
|
||||
@@ -5476,15 +5503,20 @@ packages:
|
||||
event-target-shim: 5.0.1
|
||||
dev: false
|
||||
|
||||
<<<<<<< HEAD
|
||||
/acorn-jsx@5.3.2(acorn@8.11.3):
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==,
|
||||
}
|
||||
=======
|
||||
/acorn-jsx@5.3.2(acorn@8.12.1):
|
||||
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
||||
>>>>>>> e5ac06d30 (update deps)
|
||||
peerDependencies:
|
||||
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
|
||||
dependencies:
|
||||
acorn: 8.11.3
|
||||
acorn: 8.12.1
|
||||
dev: true
|
||||
|
||||
/acorn-walk@8.3.2:
|
||||
@@ -5502,6 +5534,12 @@ packages:
|
||||
engines: { node: '>=0.4.0' }
|
||||
hasBin: true
|
||||
|
||||
/acorn@8.12.1:
|
||||
resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/ajv-formats@2.1.1(ajv@8.14.0):
|
||||
resolution:
|
||||
{
|
||||
@@ -7072,6 +7110,14 @@ packages:
|
||||
once: 1.4.0
|
||||
dev: false
|
||||
|
||||
/enhanced-resolve@5.17.0:
|
||||
resolution: {integrity: sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
dependencies:
|
||||
graceful-fs: 4.2.11
|
||||
tapable: 2.2.1
|
||||
dev: true
|
||||
|
||||
/entities@4.5.0:
|
||||
resolution:
|
||||
{
|
||||
@@ -7393,6 +7439,32 @@ packages:
|
||||
}
|
||||
engines: { node: '>=10' }
|
||||
|
||||
/eslint-config-next@15.0.0-canary.58(eslint@8.48.0)(typescript@5.5.2):
|
||||
resolution: {integrity: sha512-/lXrLXcEQ2w8dmvFBtzpfTkakVyLSm4uYCyzkV3YSx2mhx/VW4UH8q1jnv7GPmnpZJdtDr7r5Hd5Ffh1+Qlkmg==}
|
||||
peerDependencies:
|
||||
eslint: ^7.23.0 || ^8.0.0
|
||||
typescript: '>=3.3.1'
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@next/eslint-plugin-next': 15.0.0-canary.58
|
||||
'@rushstack/eslint-patch': 1.10.3
|
||||
'@typescript-eslint/eslint-plugin': 6.6.0(@typescript-eslint/parser@6.6.0)(eslint@8.48.0)(typescript@5.5.2)
|
||||
'@typescript-eslint/parser': 6.6.0(eslint@8.48.0)(typescript@5.5.2)
|
||||
eslint: 8.48.0
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.48.0)
|
||||
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.48.0)
|
||||
eslint-plugin-jsx-a11y: 6.7.1(eslint@8.48.0)
|
||||
eslint-plugin-react: 7.33.2(eslint@8.48.0)
|
||||
eslint-plugin-react-hooks: 4.6.0(eslint@8.48.0)
|
||||
typescript: 5.5.2
|
||||
transitivePeerDependencies:
|
||||
- eslint-import-resolver-webpack
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/eslint-config-prettier@9.0.0(eslint@8.48.0):
|
||||
resolution:
|
||||
{
|
||||
@@ -7418,12 +7490,41 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
<<<<<<< HEAD
|
||||
/eslint-module-utils@2.8.1(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-node@0.3.9)(eslint@8.48.0):
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==,
|
||||
}
|
||||
engines: { node: '>=4' }
|
||||
=======
|
||||
/eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.48.0):
|
||||
resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
eslint: '*'
|
||||
eslint-plugin-import: '*'
|
||||
dependencies:
|
||||
debug: 4.3.4
|
||||
enhanced-resolve: 5.17.0
|
||||
eslint: 8.48.0
|
||||
eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.48.0)
|
||||
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.48.0)
|
||||
fast-glob: 3.3.2
|
||||
get-tsconfig: 4.7.5
|
||||
is-core-module: 2.13.1
|
||||
is-glob: 4.0.3
|
||||
transitivePeerDependencies:
|
||||
- '@typescript-eslint/parser'
|
||||
- eslint-import-resolver-node
|
||||
- eslint-import-resolver-webpack
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/eslint-module-utils@2.8.1(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.48.0):
|
||||
resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==}
|
||||
engines: {node: '>=4'}
|
||||
>>>>>>> e5ac06d30 (update deps)
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': '*'
|
||||
eslint: '*'
|
||||
@@ -7446,6 +7547,7 @@ packages:
|
||||
debug: 3.2.7
|
||||
eslint: 8.48.0
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.48.0)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
@@ -7464,12 +7566,18 @@ packages:
|
||||
regexpp: 3.2.0
|
||||
dev: true
|
||||
|
||||
<<<<<<< HEAD
|
||||
/eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.6.0)(eslint@8.48.0):
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==,
|
||||
}
|
||||
engines: { node: '>=4' }
|
||||
=======
|
||||
/eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.48.0):
|
||||
resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==}
|
||||
engines: {node: '>=4'}
|
||||
>>>>>>> e5ac06d30 (update deps)
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': '*'
|
||||
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8
|
||||
@@ -7486,7 +7594,7 @@ packages:
|
||||
doctrine: 2.1.0
|
||||
eslint: 8.48.0
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-node@0.3.9)(eslint@8.48.0)
|
||||
eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.48.0)
|
||||
has: 1.0.4
|
||||
is-core-module: 2.13.1
|
||||
is-glob: 4.0.3
|
||||
@@ -7813,8 +7921,8 @@ packages:
|
||||
}
|
||||
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
|
||||
dependencies:
|
||||
acorn: 8.11.3
|
||||
acorn-jsx: 5.3.2(acorn@8.11.3)
|
||||
acorn: 8.12.1
|
||||
acorn-jsx: 5.3.2(acorn@8.12.1)
|
||||
eslint-visitor-keys: 3.4.3
|
||||
dev: true
|
||||
|
||||
@@ -7942,6 +8050,17 @@ packages:
|
||||
}
|
||||
dev: false
|
||||
|
||||
/fast-glob@3.3.1:
|
||||
resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==}
|
||||
engines: {node: '>=8.6.0'}
|
||||
dependencies:
|
||||
'@nodelib/fs.stat': 2.0.5
|
||||
'@nodelib/fs.walk': 1.2.8
|
||||
glob-parent: 5.1.2
|
||||
merge2: 1.4.1
|
||||
micromatch: 4.0.5
|
||||
dev: true
|
||||
|
||||
/fast-glob@3.3.2:
|
||||
resolution:
|
||||
{
|
||||
@@ -8279,7 +8398,6 @@ packages:
|
||||
}
|
||||
dependencies:
|
||||
resolve-pkg-maps: 1.0.0
|
||||
dev: false
|
||||
|
||||
/github-from-package@0.0.0:
|
||||
resolution:
|
||||
@@ -8420,11 +8538,15 @@ packages:
|
||||
get-intrinsic: 1.2.4
|
||||
|
||||
/graceful-fs@4.2.11:
|
||||
<<<<<<< HEAD
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==,
|
||||
}
|
||||
dev: false
|
||||
=======
|
||||
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
|
||||
>>>>>>> e5ac06d30 (update deps)
|
||||
|
||||
/grapheme-splitter@1.0.4:
|
||||
resolution:
|
||||
@@ -11500,11 +11622,15 @@ packages:
|
||||
dev: false
|
||||
|
||||
/resolve-pkg-maps@1.0.0:
|
||||
<<<<<<< HEAD
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==,
|
||||
}
|
||||
dev: false
|
||||
=======
|
||||
resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
|
||||
>>>>>>> e5ac06d30 (update deps)
|
||||
|
||||
/resolve@1.22.8:
|
||||
resolution:
|
||||
@@ -11537,10 +11663,15 @@ packages:
|
||||
engines: { iojs: '>=1.0.0', node: '>=0.10.0' }
|
||||
|
||||
/rimraf@3.0.2:
|
||||
<<<<<<< HEAD
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==,
|
||||
}
|
||||
=======
|
||||
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
|
||||
deprecated: Rimraf versions prior to v4 are no longer supported
|
||||
>>>>>>> e5ac06d30 (update deps)
|
||||
hasBin: true
|
||||
dependencies:
|
||||
glob: 7.2.3
|
||||
@@ -12320,6 +12451,11 @@ packages:
|
||||
transitivePeerDependencies:
|
||||
- ts-node
|
||||
|
||||
/tapable@2.2.1:
|
||||
resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==}
|
||||
engines: {node: '>=6'}
|
||||
dev: true
|
||||
|
||||
/tar-fs@2.1.1:
|
||||
resolution:
|
||||
{
|
||||
|
||||
@@ -14,7 +14,6 @@ import { InitTheme } from '../providers/Theme/InitTheme'
|
||||
import { mergeOpenGraph } from '../utilities/mergeOpenGraph'
|
||||
import './globals.css'
|
||||
|
||||
// eslint-disable-next-line no-restricted-exports, @typescript-eslint/require-await
|
||||
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<html className={cn(GeistSans.variable, GeistMono.variable)} lang="en" suppressHydrationWarning>
|
||||
|
||||
@@ -6,10 +6,6 @@ import React from 'react'
|
||||
export const LivePreviewListener: React.FC = () => {
|
||||
const router = useRouter()
|
||||
return (
|
||||
<PayloadLivePreview
|
||||
// eslint-disable-next-line @typescript-eslint/unbound-method
|
||||
refresh={router.refresh}
|
||||
serverURL={process.env.NEXT_PUBLIC_SERVER_URL}
|
||||
/>
|
||||
<PayloadLivePreview refresh={router.refresh} serverURL={process.env.NEXT_PUBLIC_SERVER_URL} />
|
||||
)
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import cssVariables from '../../../cssVariables'
|
||||
|
||||
const { breakpoints } = cssVariables
|
||||
|
||||
export const Image: React.FC<MediaProps> = (props) => {
|
||||
export const ImageMedia: React.FC<MediaProps> = (props) => {
|
||||
const {
|
||||
alt: altFromProps,
|
||||
fill,
|
||||
@@ -5,7 +5,7 @@ import React, { useEffect, useRef } from 'react'
|
||||
|
||||
import type { Props as MediaProps } from '../types'
|
||||
|
||||
export const Video: React.FC<MediaProps> = (props) => {
|
||||
export const VideoMedia: React.FC<MediaProps> = (props) => {
|
||||
const { onClick, resource, videoClassName } = props
|
||||
|
||||
const videoRef = useRef<HTMLVideoElement>(null)
|
||||
@@ -2,8 +2,8 @@ import React, { Fragment } from 'react'
|
||||
|
||||
import type { Props } from './types'
|
||||
|
||||
import { Image } from './Image'
|
||||
import { Video } from './Video'
|
||||
import { ImageMedia } from './ImageMedia'
|
||||
import { VideoMedia } from './VideoMedia'
|
||||
|
||||
export const Media: React.FC<Props> = (props) => {
|
||||
const { className, htmlElement = 'div', resource } = props
|
||||
@@ -19,7 +19,7 @@ export const Media: React.FC<Props> = (props) => {
|
||||
}
|
||||
: {})}
|
||||
>
|
||||
{isVideo ? <Video {...props} /> : <Image {...props} />}
|
||||
{isVideo ? <VideoMedia {...props} /> : <ImageMedia {...props} />}
|
||||
</Tag>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* eslint-disable regexp/no-obscure-range */
|
||||
/* eslint-disable @typescript-eslint/no-redundant-type-constituents */
|
||||
// @ts-nocheck
|
||||
//This copy-and-pasted from lexical here here: https://github.com/facebook/lexical/blob/c2ceee223f46543d12c574e62155e619f9a18a5d/packages/lexical/src/LexicalConstants.ts
|
||||
|
||||
@@ -76,9 +74,8 @@ const LTR =
|
||||
'\u00F8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C' +
|
||||
'\uFE00-\uFE6F\uFEFD-\uFFFF'
|
||||
|
||||
// eslint-disable-next-line no-misleading-character-class, regexp/no-misleading-unicode-character
|
||||
export const RTL_REGEX = new RegExp('^[^' + LTR + ']*[' + RTL + ']')
|
||||
// eslint-disable-next-line no-misleading-character-class, regexp/no-misleading-unicode-character
|
||||
|
||||
export const LTR_REGEX = new RegExp('^[^' + RTL + ']*[' + LTR + ']')
|
||||
|
||||
export const TEXT_TYPE_TO_FORMAT: Record<TextFormatType | string, number> = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Keep these in sync with the CSS variables in the `_css` directory
|
||||
|
||||
export default {
|
||||
const cssVariables = {
|
||||
breakpoints: {
|
||||
l: 1440,
|
||||
m: 1024,
|
||||
@@ -15,3 +15,5 @@ export default {
|
||||
error500: 'rgb(255, 111, 118)',
|
||||
},
|
||||
}
|
||||
|
||||
export default cssVariables
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { draftMode } from 'next/headers'
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/require-await
|
||||
export async function GET(): Promise<Response> {
|
||||
draftMode().disable()
|
||||
return new Response('Draft mode is disabled')
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { draftMode } from 'next/headers'
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/require-await
|
||||
export async function GET(): Promise<Response> {
|
||||
draftMode().disable()
|
||||
return new Response('Draft mode is disabled')
|
||||
|
||||
@@ -4,7 +4,6 @@ import { redirect } from 'next/navigation'
|
||||
|
||||
const payloadToken = 'payload-token'
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/require-await
|
||||
export async function GET(
|
||||
req: Request & {
|
||||
cookies: {
|
||||
|
||||
@@ -4,7 +4,6 @@ import type { Page, Post } from '../../payload-types'
|
||||
|
||||
import { mergeOpenGraph } from './mergeOpenGraph'
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/require-await
|
||||
export const generateMeta = async (args: { doc: Page | Post }): Promise<Metadata> => {
|
||||
const { doc } = args || {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user