chore: more linting

This commit is contained in:
Elliot DeNolf
2024-03-19 01:15:25 -04:00
parent c5ecf48d94
commit 1ac76d7758
17 changed files with 20 additions and 21 deletions

View File

@@ -25,7 +25,7 @@ import {
UploadFeature, UploadFeature,
lexicalEditor, lexicalEditor,
} from '@payloadcms/richtext-lexical' } from '@payloadcms/richtext-lexical'
import { slateEditor } from '@payloadcms/richtext-slate' // import { slateEditor } from '@payloadcms/richtext-slate'
import { type Config, buildConfig } from 'payload/config' import { type Config, buildConfig } from 'payload/config'
import sharp from 'sharp' import sharp from 'sharp'
// process.env.PAYLOAD_DATABASE = 'postgres' // process.env.PAYLOAD_DATABASE = 'postgres'

View File

@@ -1,8 +1,8 @@
import type { CollectionConfig } from 'payload/types'
import path from 'path' import path from 'path'
import { fileURLToPath } from 'url' import { fileURLToPath } from 'url'
import type { CollectionConfig } from 'payload/types'
import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js' import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js'
import { devUser } from '../credentials.js' import { devUser } from '../credentials.js'
const filename = fileURLToPath(import.meta.url) const filename = fileURLToPath(import.meta.url)

View File

@@ -1,7 +1,9 @@
import type { Payload } from 'payload' import type { Payload } from 'payload'
import type { Post } from './payload-types.js'
import { getPayload } from 'payload' import { getPayload } from 'payload'
import type { Post } from './payload-types.js'
import { mapAsync } from '../../packages/payload/src/utilities/mapAsync.js' import { mapAsync } from '../../packages/payload/src/utilities/mapAsync.js'
import { NextRESTClient } from '../helpers/NextRESTClient.js' import { NextRESTClient } from '../helpers/NextRESTClient.js'
import { idToString } from '../helpers/idToString.js' import { idToString } from '../helpers/idToString.js'

View File

@@ -1,4 +1,5 @@
import type { Payload } from 'payload' import type { Payload } from 'payload'
import type { NextRESTClient } from '../helpers/NextRESTClient.js' import type { NextRESTClient } from '../helpers/NextRESTClient.js'
import { initPayloadInt } from '../helpers/initPayloadInt.js' import { initPayloadInt } from '../helpers/initPayloadInt.js'

View File

@@ -1,6 +1,7 @@
import { type Payload } from 'payload'
import type { NextRESTClient } from '../helpers/NextRESTClient.js' import type { NextRESTClient } from '../helpers/NextRESTClient.js'
import { type Payload } from 'payload'
import { initPayloadInt } from '../helpers/initPayloadInt.js' import { initPayloadInt } from '../helpers/initPayloadInt.js'
import configPromise from './config.js' import configPromise from './config.js'
import { import {

View File

@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js' import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js'
import { devUser } from '../credentials.js' import { devUser } from '../credentials.js'

View File

@@ -1,10 +1,10 @@
import type { Page } from '@playwright/test' import type { Page } from '@playwright/test'
import type { Payload } from 'payload'
import { expect, test } from '@playwright/test' import { expect, test } from '@playwright/test'
import path from 'path' import path from 'path'
import { fileURLToPath } from 'url' import { fileURLToPath } from 'url'
import type { Payload } from 'payload'
import type { import type {
FieldsRelationship as CollectionWithRelationships, FieldsRelationship as CollectionWithRelationships,
RelationOne, RelationOne,

View File

@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
import type { CollectionConfig } from 'payload/types' import type { CollectionConfig } from 'payload/types'
import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js' import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js'

View File

@@ -1,10 +1,10 @@
import type { Page } from '@playwright/test' import type { Page } from '@playwright/test'
import type { Payload } from 'payload'
import { expect, test } from '@playwright/test' import { expect, test } from '@playwright/test'
import path from 'path' import path from 'path'
import { fileURLToPath } from 'url' import { fileURLToPath } from 'url'
import type { Payload } from 'payload'
import type { RelationshipField, TextField } from './payload-types.js' import type { RelationshipField, TextField } from './payload-types.js'
import wait from '../../packages/payload/src/utilities/wait.js' import wait from '../../packages/payload/src/utilities/wait.js'

View File

@@ -3,14 +3,11 @@ import type { IndexDirection, IndexOptions } from 'mongoose'
import type { Payload } from 'payload' import type { Payload } from 'payload'
import type { PaginatedDocs } from 'payload/database' import type { PaginatedDocs } from 'payload/database'
import { getPayload } from 'payload'
import type { NextRESTClient } from '../helpers/NextRESTClient.js' import type { NextRESTClient } from '../helpers/NextRESTClient.js'
import type { GroupField, RichTextField } from './payload-types.js' import type { GroupField, RichTextField } from './payload-types.js'
import { devUser } from '../credentials.js' import { devUser } from '../credentials.js'
import { isMongoose } from '../helpers/isMongoose.js' import { isMongoose } from '../helpers/isMongoose.js'
import { startMemoryDB } from '../startMemoryDB.js'
import { arrayDefaultValue } from './collections/Array/index.js' import { arrayDefaultValue } from './collections/Array/index.js'
import { blocksDoc } from './collections/Blocks/shared.js' import { blocksDoc } from './collections/Blocks/shared.js'
import { dateDoc } from './collections/Date/shared.js' import { dateDoc } from './collections/Date/shared.js'

View File

@@ -1,4 +1,5 @@
import type { Payload } from 'payload' import type { Payload } from 'payload'
import type { NextRESTClient } from '../helpers/NextRESTClient.js' import type { NextRESTClient } from '../helpers/NextRESTClient.js'
import { initPayloadInt } from '../helpers/initPayloadInt.js' import { initPayloadInt } from '../helpers/initPayloadInt.js'

View File

@@ -1,9 +1,9 @@
import type { Payload } from 'payload'
import * as AWS from '@aws-sdk/client-s3' import * as AWS from '@aws-sdk/client-s3'
import path from 'path' import path from 'path'
import { fileURLToPath } from 'url' import { fileURLToPath } from 'url'
import type { Payload } from 'payload'
import { describeIfInCIOrHasLocalstack } from '../helpers.js' import { describeIfInCIOrHasLocalstack } from '../helpers.js'
import { initPayloadInt } from '../helpers/initPayloadInt.js' import { initPayloadInt } from '../helpers/initPayloadInt.js'
import configPromise from './config.js' import configPromise from './config.js'

View File

@@ -2,11 +2,11 @@ import type { Page } from '@playwright/test'
import { expect, test } from '@playwright/test' import { expect, test } from '@playwright/test'
import path from 'path' import path from 'path'
import payload from 'payload'
import { fileURLToPath } from 'url' import { fileURLToPath } from 'url'
import type { Page as PayloadPage } from './payload-types.js' import type { Page as PayloadPage } from './payload-types.js'
import payload from 'payload'
import { initPageConsoleErrorCatch } from '../helpers.js' import { initPageConsoleErrorCatch } from '../helpers.js'
import { AdminUrlUtil } from '../helpers/adminUrlUtil.js' import { AdminUrlUtil } from '../helpers/adminUrlUtil.js'
import { initPayloadE2E } from '../helpers/initPayloadE2E.js' import { initPayloadE2E } from '../helpers/initPayloadE2E.js'

View File

@@ -1,8 +1,8 @@
import type { Payload } from 'payload'
import path from 'path' import path from 'path'
import { fileURLToPath } from 'url' import { fileURLToPath } from 'url'
import type { Payload } from 'payload'
import getFileByPath from '../../packages/payload/src/uploads/getFileByPath.js' import getFileByPath from '../../packages/payload/src/uploads/getFileByPath.js'
import { initPayloadInt } from '../helpers/initPayloadInt.js' import { initPayloadInt } from '../helpers/initPayloadInt.js'
import removeFiles from '../helpers/removeFiles.js' import removeFiles from '../helpers/removeFiles.js'

View File

@@ -1,10 +1,10 @@
import type { Page } from '@playwright/test' import type { Page } from '@playwright/test'
import type { Payload } from 'payload/types'
import { expect, test } from '@playwright/test' import { expect, test } from '@playwright/test'
import path from 'path' import path from 'path'
import { fileURLToPath } from 'url' import { fileURLToPath } from 'url'
import type { Payload } from 'payload/types'
import type { Media } from './payload-types.js' import type { Media } from './payload-types.js'
import wait from '../../packages/payload/src/utilities/wait.js' import wait from '../../packages/payload/src/utilities/wait.js'

View File

@@ -24,13 +24,12 @@
*/ */
import type { Page } from '@playwright/test' import type { Page } from '@playwright/test'
import type { Payload } from 'payload/types'
import { expect, test } from '@playwright/test' import { expect, test } from '@playwright/test'
import path from 'path' import path from 'path'
import { fileURLToPath } from 'url' import { fileURLToPath } from 'url'
import type { Payload } from 'payload/types'
import wait from '../../packages/payload/src/utilities/wait.js' import wait from '../../packages/payload/src/utilities/wait.js'
import { globalSlug } from '../admin/slugs.js' import { globalSlug } from '../admin/slugs.js'
import { import {

View File

@@ -1,4 +1,5 @@
import { type Payload } from 'payload' import { type Payload } from 'payload'
import { devUser } from '../credentials.js' import { devUser } from '../credentials.js'
import { seedDB } from '../helpers/seed.js' import { seedDB } from '../helpers/seed.js'
import { titleToDelete } from './shared.js' import { titleToDelete } from './shared.js'