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

docs: improve why usePrettierrc option is needed #506

Closed
JounQin opened this issue Aug 13, 2022 · 3 comments
Closed

docs: improve why usePrettierrc option is needed #506

JounQin opened this issue Aug 13, 2022 · 3 comments
Assignees
Labels

Comments

@JounQin
Copy link
Member

JounQin commented Aug 13, 2022

@BPScott I don't quite understand why we add usePrettierrc option in #83, prettierrc is used for all tools, it should always be preferred, I have no idea about in which case we should have inconsistent prettier settings, what do you think?

Maybe @eliperelman @azz @not-an-aardvark can help me to understand?

Originally posted by @JounQin in #481 (comment)

@BPScott
Copy link
Member

BPScott commented Aug 18, 2022

#83 was before my time. It is possible to run prettier without loading the prettierrc config file via the CLI's --no-config option or through the API by calling prettier.format() without passing through the options generated by calling resolveConfig.

I suspect #83 was added to maintain parity with those options, because somebody was creating some tool that wrapped over prettier/eslint with a set of hardcoded, unconfigurable settings.

I agree that 99% of the time users should won't need this functionality, and that they should rely on settings their options in their .prettierrc file. However somebody clearly had a need for it and the maintenance overhead is negligible, so I think it is worthwhile to keep this setting.

@JounQin
Copy link
Member Author

JounQin commented Aug 18, 2022

I want to understand in which case a user would want a different config between ESLint and prettier itself.

It is possible to run prettier without loading the prettierrc config file via the CLI's --no-config option or through the API by calling prettier.format() without passing through the options generated by calling resolveConfig.

This seems reasonable, so closing. But the document could be improved, so that any further maintainer won't be confused like me.

@JounQin JounQin changed the title [v5] remove usePrettierrc option docs: improve why usePrettierrc option is needed Aug 18, 2022
@JounQin JounQin self-assigned this Aug 20, 2022
JounQin added a commit that referenced this issue Sep 1, 2022
JounQin added a commit that referenced this issue Sep 1, 2022
@JounQin
Copy link
Member Author

JounQin commented Sep 1, 2022

close via #510

@JounQin JounQin closed this as completed Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants