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

How to reliably read dprint.json from a user's project? #13

Open
jasonkuhrt opened this issue Oct 25, 2024 · 0 comments
Open

How to reliably read dprint.json from a user's project? #13

jasonkuhrt opened this issue Oct 25, 2024 · 0 comments

Comments

@jasonkuhrt
Copy link

Hey, here's my situation:

  1. Given a tool X that applies dprint programmatically to code that it generates into a users project Y
  2. Given that X wants to allow Y to control formatting options

How does X read the optional dprint configuration file in Y reliably? I could just look for a dprint.json in CWD etc. but I don't want corner cases to hit the user. E.g. the same resolution algorithm that the user's IDE uses I want my tool to use.

Is there any APIs to support this? Thanks!

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