chore: run lint and prettier on entire codebase

This commit is contained in:
Alessio Gravili
2024-07-11 15:27:01 -04:00
parent f8ab5a9f1e
commit 83fd4c6622
364 changed files with 2578 additions and 2658 deletions

View File

@@ -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) {

View File

@@ -1,5 +1,3 @@
/* eslint-disable no-param-reassign */
import type { CollectionConfig } from 'payload'
export const dataHooksSlug = 'data-hooks'

View File

@@ -1,4 +1,3 @@
/* eslint-disable no-param-reassign */
import type { CollectionConfig } from 'payload'
export const hooksSlug = 'hooks'

View File

@@ -1,4 +1,3 @@
/* eslint-disable no-param-reassign */
import type { CollectionConfig } from 'payload'
const validateFieldTransformAction = (hook: string, value) => {

View File

@@ -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: {

View File

@@ -1,5 +1,3 @@
/* eslint-disable no-param-reassign */
import type { GlobalConfig } from 'payload'
export const dataHooksGlobalSlug = 'data-hooks-global'