Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@feathersjs/generators ignores .prettierrc #3517

Open
buxit opened this issue Jul 24, 2024 · 0 comments
Open

@feathersjs/generators ignores .prettierrc #3517

buxit opened this issue Jul 24, 2024 · 0 comments

Comments

@buxit
Copy link

buxit commented Jul 24, 2024

Steps to reproduce

create .prettierrc with

{
  "semi": true,
}

run npx featers generate service to create a service

Expected behavior

lines should end with semicolons

Actual behavior

.prettierrc is ignored

Probable fix

prettier.resolveConfig() seems to expect a file, not a directory. testing suggests that the file doesn't have to exist.
in packages/generators/src/commons.ts the line

const config = (await prettier.resolveConfig(ctx.cwd)) || options

could be changed to something like this:

const config = (await prettier.resolveConfig(join(ctx.cwd, '.prettierrc'))) || options

according to my minimal testing, cwd can also be omitted completely:

const config = (await prettier.resolveConfig()) || options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant