chore: run lint and prettier on entire codebase
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
/* eslint-disable no-param-reassign */
|
||||
import type { CollectionConfig } from 'payload'
|
||||
import type { PayloadRequest } from 'payload'
|
||||
import type { CollectionConfig, PayloadRequest } from 'payload'
|
||||
|
||||
export const contextHooksSlug = 'context-hooks'
|
||||
const ContextHooks: CollectionConfig = {
|
||||
@@ -14,7 +12,6 @@ const ContextHooks: CollectionConfig = {
|
||||
hooks: {
|
||||
beforeOperation: [
|
||||
({ context, args }) => {
|
||||
// eslint-disable-next-line prefer-destructuring
|
||||
const req: PayloadRequest = args.req
|
||||
|
||||
if (req.searchParams.size === 0) {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* eslint-disable no-param-reassign */
|
||||
|
||||
import type { CollectionConfig } from 'payload'
|
||||
|
||||
export const dataHooksSlug = 'data-hooks'
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-param-reassign */
|
||||
import type { CollectionConfig } from 'payload'
|
||||
|
||||
export const hooksSlug = 'hooks'
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-param-reassign */
|
||||
import type { CollectionConfig } from 'payload'
|
||||
|
||||
const validateFieldTransformAction = (hook: string, value) => {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { rootEslintConfig, rootParserOptions } from '../../eslint.config.js'
|
||||
import { rootParserOptions } from '../../eslint.config.js'
|
||||
import testEslintConfig from '../eslint.config.js'
|
||||
|
||||
/** @typedef {import('eslint').Linter.FlatConfig} */
|
||||
let FlatConfig
|
||||
|
||||
/** @type {FlatConfig[]} */
|
||||
export const index = [
|
||||
...rootEslintConfig,
|
||||
...testEslintConfig,
|
||||
{
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* eslint-disable no-param-reassign */
|
||||
|
||||
import type { GlobalConfig } from 'payload'
|
||||
|
||||
export const dataHooksGlobalSlug = 'data-hooks-global'
|
||||
|
||||
Reference in New Issue
Block a user