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

Why config implicitly ignores editorconfig? #3963

Closed
olsonpm opened this issue Feb 12, 2018 · 3 comments
Closed

Why config implicitly ignores editorconfig? #3963

olsonpm opened this issue Feb 12, 2018 · 3 comments
Labels
area:cli Issues with Prettier's Command Line Interface locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:question Questions and support requests. Please use Stack Overflow for them, not the issue tracker.

Comments

@olsonpm
Copy link

olsonpm commented Feb 12, 2018

I read through some comments in the pr introducing editorconfig integration - but I can't find a reason why specifying a config should ignore a search for editorconfig.

My expectation is for the cli to parse .editorconfig for the filenames unless I specify --no-editorconfig. I also expect a specified --config to only modify where .prettierrc is found.

I ask because I'm trying to create a PR integrating an API change in cosmiconfig, and I would like to understand this behavior before I continue.

@azz
Copy link
Member

azz commented Feb 17, 2018

cc. @josephfrazier. I don't think we settled intentionally on one side or the other.

I think you are right in that --config .prettierrc should still respect .editorconfig, and --config .prettierrc --no-editorconfig should not.

@azz azz added type:question Questions and support requests. Please use Stack Overflow for them, not the issue tracker. area:cli Issues with Prettier's Command Line Interface labels Feb 17, 2018
@josephfrazier
Copy link
Collaborator

Hmm, it looks like I originally added this behavior in 7c2b545, but I don't remember why. I agree with @azz that passing --config should still respect .editorconfig, so I'll open a PR to fix this. However, one side effect of fixing this will be that editor integrations calling prettier --config ... will still have to wait for the editorconfig resolution process if they don't also pass --no-editorconfig, but that seems preferable to the current behavior.

@olsonpm
Copy link
Author

olsonpm commented Feb 17, 2018

hey thanks so much. I can work on the PR if you'd like as well.

@azz azz closed this as completed in #3992 Feb 24, 2018
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jul 5, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:cli Issues with Prettier's Command Line Interface locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:question Questions and support requests. Please use Stack Overflow for them, not the issue tracker.
Projects
None yet
Development

No branches or pull requests

3 participants