The resolveConfig method is invoked with process.cwd() as first argument.
|
const prettierConfig = await resolveConfig(process.cwd()) |
Using process.cwd() as argument the config returns null on Node v18.17.0.
Without it, the config is resolved correctly.
.prettierrc
{
trailingComma': 'es5',
tabWidth: 2,
semi: true,
singleQuote: true,
printWidth: 80,
proseWrap: 'never'
}
index.js
const prettier = require("prettier");
const prettierConfig = await resolveConfig(process.cwd()) // null
const prettier = require("prettier");
const prettierConfig = await resolveConfig() // resolved correctly
The
resolveConfigmethod is invoked withprocess.cwd()as first argument.contentful-typescript-codegen/src/renderers/render.ts
Line 41 in ee3f7d2
Using
process.cwd()as argument the config returnsnullon Node v18.17.0.Without it, the config is resolved correctly.
.prettierrc
index.js