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

@@ -28,14 +28,14 @@ const customAuthenticationStrategy: AuthStrategyFunction = async ({ headers, pay
if (!user) return { user: null }
return {
responseHeaders: new Headers({
'Smile-For-Me': 'please',
}),
user: {
...user,
_strategy: `${usersSlug}-${strategyName}`,
collection: usersSlug,
},
responseHeaders: new Headers({
'Smile-For-Me': 'please',
}),
}
}

View File

@@ -34,10 +34,10 @@ const headers = {
}
const createFirstUser = async ({
page,
serverURL,
customAdminRoutes,
customRoutes,
page,
serverURL,
}: {
customAdminRoutes?: SanitizedConfig['admin']['routes']
customRoutes?: SanitizedConfig['routes']

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

@@ -72,9 +72,9 @@ describe('Auth', () => {
it('should prevent registering a new first user', async () => {
const response = await restClient.POST(`/${slug}/first-register`, {
body: JSON.stringify({
'confirm-password': password,
email,
password,
'confirm-password': password,
}),
})
@@ -742,11 +742,11 @@ describe('Auth', () => {
const reset = await payload.resetPassword({
collection: 'users',
overrideAccess: true,
data: {
password: 'test',
token: forgot,
},
overrideAccess: true,
})
expect(reset.user.email).toStrictEqual('dev@payloadcms.com')