chore: run lint and prettier on entire codebase
This commit is contained in:
@@ -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',
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,10 +34,10 @@ const headers = {
|
||||
}
|
||||
|
||||
const createFirstUser = async ({
|
||||
page,
|
||||
serverURL,
|
||||
customAdminRoutes,
|
||||
customRoutes,
|
||||
page,
|
||||
serverURL,
|
||||
}: {
|
||||
customAdminRoutes?: SanitizedConfig['admin']['routes']
|
||||
customRoutes?: SanitizedConfig['routes']
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user