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

@@ -45,9 +45,7 @@ export default buildConfigWithDefaults({
{
name: 'json',
type: 'json',
required: true,
jsonSchema: {
uri: 'a://b/foo.json',
fileMatch: ['a://b/foo.json'],
schema: {
type: 'array',
@@ -69,7 +67,9 @@ export default buildConfigWithDefaults({
required: ['id', 'name'], // Specify which properties are required
},
},
uri: 'a://b/foo.json',
},
required: true,
},
],
},
@@ -107,6 +107,7 @@ export default buildConfigWithDefaults({
({ jsonSchema }) => {
jsonSchema.definitions.objectWithNumber = {
type: 'object',
additionalProperties: false,
properties: {
id: {
type: 'number',
@@ -114,7 +115,6 @@ export default buildConfigWithDefaults({
},
},
required: true,
additionalProperties: false,
}
return jsonSchema
},

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

@@ -8,147 +8,146 @@
export interface Config {
auth: {
users: UserAuthOperations;
};
users: UserAuthOperations
}
collections: {
posts: Post;
users: User;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
posts: Post
users: User
'payload-preferences': PayloadPreference
'payload-migrations': PayloadMigration
}
globals: {
menu: Menu;
'custom-ts': CustomT;
};
locale: null;
menu: Menu
'custom-ts': CustomT
}
locale: null
user: User & {
collection: 'users';
};
collection: 'users'
}
}
export interface UserAuthOperations {
forgotPassword: {
email: string;
};
email: string
}
login: {
password: string;
email: string;
};
password: string
email: string
}
registerFirstUser: {
email: string;
password: string;
};
email: string
password: string
}
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "posts".
*/
export interface Post {
id: string;
text?: string | null;
id: string
text?: string | null
richText?: {
root: {
type: string;
type: string
children: {
type: string;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
} | null;
type: string
version: number
[k: string]: unknown
}[]
direction: ('ltr' | 'rtl') | null
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''
indent: number
version: number
}
[k: string]: unknown
} | null
richText2?: {
root: {
type: string;
type: string
children: {
type: string;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
} | null;
updatedAt: string;
createdAt: string;
_status?: ('draft' | 'published') | null;
type: string
version: number
[k: string]: unknown
}[]
direction: ('ltr' | 'rtl') | null
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''
indent: number
version: number
}
[k: string]: unknown
} | null
updatedAt: string
createdAt: string
_status?: ('draft' | 'published') | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
id: string
updatedAt: string
createdAt: string
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: string;
id: string
user: {
relationTo: 'users';
value: string | User;
};
key?: string | null;
relationTo: 'users'
value: string | User
}
key?: string | null
value?:
| {
[k: string]: unknown;
[k: string]: unknown
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
batch?: number | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "menu".
*/
export interface Menu {
id: string;
globalText?: string | null;
updatedAt?: string | null;
createdAt?: string | null;
id: string
globalText?: string | null
updatedAt?: string | null
createdAt?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "auth".
*/
export interface Auth {
[k: string]: unknown;
[k: string]: unknown
}
declare module 'payload' {
// @ts-ignore
export interface GeneratedTypes extends Config {}