diff --git a/src/config.ts b/src/config.ts index e55b9f8..e025999 100644 --- a/src/config.ts +++ b/src/config.ts @@ -76,7 +76,7 @@ const configSchema = Type.Object( */ exportedTypePrefix: Type.String({ default: "" }), }, - { additionalProperties: false } + { additionalProperties: false }, ); // biome-ignore lint/suspicious/noExplicitAny: we want to set the default value diff --git a/src/generators/primitiveField.ts b/src/generators/primitiveField.ts index 7f94cea..9772301 100644 --- a/src/generators/primitiveField.ts +++ b/src/generators/primitiveField.ts @@ -15,7 +15,7 @@ const PrimitiveFields = [ export type PrimitivePrismaFieldType = (typeof PrimitiveFields)[number]; export function isPrimitivePrismaFieldType( - str: string + str: string, ): str is PrimitivePrismaFieldType { // biome-ignore lint/suspicious/noExplicitAny: we want to check if the string is a valid primitive field return PrimitiveFields.includes(str as any); diff --git a/src/model.ts b/src/model.ts index 1622a8a..8258755 100644 --- a/src/model.ts +++ b/src/model.ts @@ -11,13 +11,13 @@ import { processedRelationsInputUpdate, } from "./generators/relations"; import { processedSelect } from "./generators/select"; -import { processedWhere, processedWhereUnique } from "./generators/where"; -import { makeComposite } from "./generators/wrappers/composite"; -import { nullableImport, nullableType } from "./generators/wrappers/nullable"; import { - transformDateType, transformDateImportStatement, + transformDateType, } from "./generators/transformDate"; +import { processedWhere, processedWhereUnique } from "./generators/where"; +import { makeComposite } from "./generators/wrappers/composite"; +import { nullableImport, nullableType } from "./generators/wrappers/nullable"; export type ProcessedModel = { name: string; @@ -25,7 +25,7 @@ export type ProcessedModel = { }; function convertModelToStandalone( - input: Pick + input: Pick, ) { return `export const ${getConfig().exportedTypePrefix}${input.name} = ${input.stringRepresentation}\n`; } @@ -89,7 +89,7 @@ export function mapAllModelsForWrite() { `${value}\n${convertModelToStandalone({ name: key, stringRepresentation: composite, - })}` + })}`, ); } @@ -106,7 +106,7 @@ export function mapAllModelsForWrite() { `${value}\n${convertModelToStandalone({ name: `${key}InputCreate`, stringRepresentation: composite, - })}` + })}`, ); } } @@ -124,7 +124,7 @@ export function mapAllModelsForWrite() { `${value}\n${convertModelToStandalone({ name: `${key}InputUpdate`, stringRepresentation: composite, - })}` + })}`, ); } } @@ -132,7 +132,7 @@ export function mapAllModelsForWrite() { for (const [key, value] of modelsPerName) { modelsPerName.set( key, - `${typepoxImportStatement()}\n${transformDateImportStatement()}\n${nullableImport()}\n${value}` + `${typepoxImportStatement()}\n${transformDateImportStatement()}\n${nullableImport()}\n${value}`, ); }