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

feat: use .editorconfig values as fallback config source #61

Open
twelvelabs opened this issue Oct 14, 2022 · 2 comments
Open

feat: use .editorconfig values as fallback config source #61

twelvelabs opened this issue Oct 14, 2022 · 2 comments

Comments

@twelvelabs
Copy link

I already have things like indent size configured in .editorconfig. I'd love to have yamlfmt use those settings rather than duplicate them in .yamlfmt.

Would you be open to a PR that includes editorconfig-core-go and uses .editorconfig values as defaults?

@braydonk
Copy link
Collaborator

braydonk commented Oct 14, 2022

Thanks for making an issue!
I would open to that PR, as long as it's configurable. I'm trying not to buy in directly to any other tools by default if possible, but if it was a configurable feature that would be good with me.

Something like this would be great:

formatters:
  type: basic
  use_editorconfig: true

@braydonk
Copy link
Collaborator

braydonk commented Nov 3, 2022

@twelvelabs Did you end up working on a PR for this? I've been thinking about it again, and I realized that it doesn't necessarily need to be a config flag. I think as long as it's done in a way where it doesn't fail if the user does not have an editorconfig, then I think it's fine to check the user's environment for one and simply no-op if one isn't found.

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

2 participants