diff --git a/generator.ts b/generator.ts index 2d8d6d5..08b2324 100755 --- a/generator.ts +++ b/generator.ts @@ -246,11 +246,9 @@ generatorHandler({ throw new Error("Unable import Prettier. Is it installed?"); } - let prettierOptions = config.resolvePrettierConfig + const prettierOptions = config.resolvePrettierConfig ? await prettier.resolveConfig(outputFile) - : {}; - - prettierOptions ??= {}; + : null; ts = await prettier.format(ts, { ...prettierOptions, parser: "typescript" }); } diff --git a/package-lock.json b/package-lock.json index 9ab6327..8facddd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "prisma-generator-typescript-interfaces", - "version": "1.6.1", + "version": "1.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "prisma-generator-typescript-interfaces", - "version": "1.6.1", + "version": "1.7.0", "license": "MIT", "dependencies": { "@prisma/generator-helper": "^5.0.0" diff --git a/package.json b/package.json index 58a202e..1a603b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prisma-generator-typescript-interfaces", - "version": "1.6.1", + "version": "1.7.0", "description": "Generate zero-dependency Typescript interfaces from Prisma schema", "author": "Morgan Zolob", "license": "MIT",