run pnpm lint:fix

This commit is contained in:
Germán Jabloñski
2025-05-12 10:25:50 -03:00
parent 49528525b2
commit 7818cb655c
11 changed files with 16 additions and 16 deletions

View File

@@ -23,10 +23,10 @@ export async function createGlobal<T extends Record<string, unknown>>(
data,
db,
fields: globalConfig.flattenedFields,
ignoreResult: returning === false,
operation: 'create',
req,
tableName,
ignoreResult: returning === false,
})
if (returning === false) {

View File

@@ -17,11 +17,11 @@ export async function createGlobalVersion<T extends TypeWithID>(
globalSlug,
publishedLocale,
req,
returning,
select,
snapshot,
updatedAt,
versionData,
returning,
}: CreateGlobalVersionArgs,
) {
const db = await getTransaction(this, req)
@@ -42,11 +42,11 @@ export async function createGlobalVersion<T extends TypeWithID>(
},
db,
fields: buildVersionGlobalFields(this.payload.config, global, true),
ignoreResult: returning === false ? 'idOnly' : false,
operation: 'create',
req,
select,
tableName,
ignoreResult: returning === false ? 'idOnly' : false,
})
const table = this.tables[tableName]

View File

@@ -18,11 +18,11 @@ export async function createVersion<T extends TypeWithID>(
parent,
publishedLocale,
req,
returning,
select,
snapshot,
updatedAt,
versionData,
returning,
}: CreateVersionArgs<T>,
) {
const db = await getTransaction(this, req)

View File

@@ -54,7 +54,7 @@ export const traverseFields = ({ doc, fields, locale, path, rows }: Args) => {
// Can ignore string blocks, as those were added in v3 and don't need to be migrated
const matchedBlock = field.blocks.find(
(block) => typeof block !== 'string' && block.slug === row.blockType,
) as FlattenedBlock | undefined
)
if (matchedBlock) {
return traverseFields({
@@ -75,7 +75,7 @@ export const traverseFields = ({ doc, fields, locale, path, rows }: Args) => {
// Can ignore string blocks, as those were added in v3 and don't need to be migrated
const matchedBlock = field.blocks.find(
(block) => typeof block !== 'string' && block.slug === row.blockType,
) as FlattenedBlock | undefined
)
if (matchedBlock) {
return traverseFields({

View File

@@ -9,7 +9,7 @@ import { getTransaction } from './utilities/getTransaction.js'
export async function updateGlobal<T extends Record<string, unknown>>(
this: DrizzleAdapter,
{ slug, data, req, select, returning }: UpdateGlobalArgs,
{ slug, data, req, returning, select }: UpdateGlobalArgs,
): Promise<T> {
const db = await getTransaction(this, req)
const globalConfig = this.payload.globals.config.find((config) => config.slug === slug)
@@ -23,10 +23,10 @@ export async function updateGlobal<T extends Record<string, unknown>>(
data,
db,
fields: globalConfig.flattenedFields,
ignoreResult: returning === false,
req,
select,
tableName,
ignoreResult: returning === false,
})
if (returning === false) {

View File

@@ -21,10 +21,10 @@ export async function updateGlobalVersion<T extends TypeWithID>(
global,
locale,
req,
returning,
select,
versionData,
where: whereArg,
returning,
}: UpdateGlobalVersionArgs<T>,
) {
const db = await getTransaction(this, req)
@@ -53,12 +53,12 @@ export async function updateGlobalVersion<T extends TypeWithID>(
data: versionData,
db,
fields,
ignoreResult: returning === false,
operation: 'update',
req,
select,
tableName,
where,
ignoreResult: returning === false,
})
if (returning === false) {

View File

@@ -21,10 +21,10 @@ export async function updateVersion<T extends TypeWithID>(
collection,
locale,
req,
returning,
select,
versionData,
where: whereArg,
returning,
}: UpdateVersionArgs<T>,
) {
const db = await getTransaction(this, req)
@@ -50,13 +50,13 @@ export async function updateVersion<T extends TypeWithID>(
data: versionData,
db,
fields,
ignoreResult: returning === false,
joinQuery: false,
operation: 'update',
req,
select,
tableName,
where,
ignoreResult: returning === false,
})
if (returning === false) {

View File

@@ -12,7 +12,7 @@ type BaseArgs = {
* When true, skips reading the data back from the database and returns the input data
* @default false
*/
ignoreResult?: boolean | 'idOnly'
ignoreResult?: 'idOnly' | boolean
joinQuery?: JoinQuery
path?: string
req?: Partial<PayloadRequest>

View File

@@ -17,7 +17,7 @@ export const recursivelyBuildNestedPaths = ({ field, nestedFieldName2, parentNam
if (field.type === 'tabs') {
// if the tab has a name, treat it as a group
// otherwise, treat it as a row
return (field.tabs as Tab[]).reduce((tabSchema, tab: any) => {
return field.tabs.reduce((tabSchema, tab: any) => {
tabSchema.push(
...recursivelyBuildNestedPaths({
field: {

View File

@@ -11,7 +11,7 @@ export function TextPlugin({ features }: { features: SanitizedClientFeatures })
const [editor] = useLexicalComposerContext()
useEffect(() => {
const disabledFormats = getDisabledFormats(features.enabledFormats as TextFormatType[])
const disabledFormats = getDisabledFormats(features.enabledFormats)
if (disabledFormats.length === 0) {
return
}

View File

@@ -25,13 +25,13 @@ import React from 'react'
import type { SortColumnProps } from '../../elements/SortColumn/index.js'
import { RenderServerComponent } from '../../elements/RenderServerComponent/index.js'
import {
RenderCustomComponent,
RenderDefaultCell,
SortColumn,
// eslint-disable-next-line payload/no-imports-from-exports-dir
} from '../../exports/client/index.js'
import { RenderServerComponent } from '../../elements/RenderServerComponent/index.js'
import { filterFields } from './filterFields.js'
type Args = {