From 6e03558dcb63e79d48fff9ec95bbf77dfc8212c4 Mon Sep 17 00:00:00 2001 From: Paul Popus Date: Tue, 12 Mar 2024 10:52:41 -0300 Subject: [PATCH] chore: eslint the _community code --- test/_community/collections/Media/index.ts | 16 ++++++++-------- test/_community/collections/Posts/index.ts | 14 +++++++------- test/_community/config.ts | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/test/_community/collections/Media/index.ts b/test/_community/collections/Media/index.ts index 88a71a999..5610002e2 100644 --- a/test/_community/collections/Media/index.ts +++ b/test/_community/collections/Media/index.ts @@ -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: [], } diff --git a/test/_community/collections/Posts/index.ts b/test/_community/collections/Posts/index.ts index 21f8ef434..9d8bb26f0 100644 --- a/test/_community/collections/Posts/index.ts +++ b/test/_community/collections/Posts/index.ts @@ -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, + }, } diff --git a/test/_community/config.ts b/test/_community/config.ts index 455e71054..34d5df043 100644 --- a/test/_community/config.ts +++ b/test/_community/config.ts @@ -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,