chore: eslint the _community code

This commit is contained in:
Paul Popus
2024-03-12 10:52:41 -03:00
parent b327dd31b7
commit 6e03558dcb
3 changed files with 16 additions and 16 deletions

View File

@@ -4,30 +4,30 @@ export const mediaSlug = 'media'
export const MediaCollection: CollectionConfig = {
slug: mediaSlug,
access: {
create: () => true,
read: () => true,
},
fields: [],
upload: {
crop: true,
focalPoint: true,
imageSizes: [
{
name: 'thumbnail',
width: 200,
height: 200,
width: 200,
},
{
name: 'medium',
width: 800,
height: 800,
width: 800,
},
{
name: 'large',
width: 1200,
height: 1200,
width: 1200,
},
],
},
access: {
read: () => true,
create: () => true,
},
fields: [],
}

View File

@@ -5,12 +5,10 @@ import { mediaSlug } from '../Media/index.js'
export const postsSlug = 'posts'
export const PostsCollection: CollectionConfig = {
slug: postsSlug,
admin: {
useAsTitle: 'text',
},
versions: {
drafts: true,
},
fields: [
{
name: 'text',
@@ -27,12 +25,12 @@ export const PostsCollection: CollectionConfig = {
},
{
name: 'associatedMedia',
type: 'upload',
access: {
create: () => true,
update: () => false,
},
relationTo: mediaSlug,
type: 'upload',
},
{
name: 'blocksField',
@@ -42,12 +40,12 @@ export const PostsCollection: CollectionConfig = {
slug: 'block1',
fields: [
{
type: 'group',
name: 'group1',
type: 'group',
fields: [
{
type: 'text',
name: 'group1Text',
type: 'text',
},
],
},
@@ -56,5 +54,7 @@ export const PostsCollection: CollectionConfig = {
],
},
],
slug: postsSlug,
versions: {
drafts: true,
},
}

View File

@@ -34,7 +34,7 @@ export default buildConfigWithDefaults({
const imageFilePath = path.resolve(process.cwd(), './test/uploads/image.png')
const imageFile = await getFileByPath(imageFilePath)
const { id: uploadedImage } = await payload.create({
await payload.create({
collection: 'media',
data: {},
file: imageFile,