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

Document how to set config #109

Closed
aaronjensen opened this issue Feb 15, 2019 · 4 comments
Closed

Document how to set config #109

aaronjensen opened this issue Feb 15, 2019 · 4 comments

Comments

@aaronjensen
Copy link
Contributor

I'm sure I'm just missing something, but I cannot find any documentation on how to set the config variables when running from the command line. No prettier plugin I can find documents that and prettier itself doesn't seem to document it. Is it possible, or am I forced to use the defaults if I use the command line?

@kddnewton
Copy link
Member

Hey - thanks for all the help! I'll look at this list of issues after work.

You can specify any of the options on the command line with their dasherized equivalent. As in preferSingleQuotes would be --prefer-single-quotes. You can put a false after it to set it to false.

If you wouldn't mind taking a pass at documenting it in the README I'd be happy to merge a PR for it.

@aaronjensen
Copy link
Contributor Author

No problem. So there's no way to set config in prettier.config.js?

@kddnewton
Copy link
Member

It's the same thing with prettier.config.js as normal. You just put the keys from the ones listed in the README with the values that you want as the main export.

@aaronjensen
Copy link
Contributor Author

Oh, great. Okay, I'll toss up a PR, thank you.

aaronjensen added a commit to aaronjensen/plugin-ruby that referenced this issue Feb 15, 2019
aaronjensen added a commit to aaronjensen/plugin-ruby that referenced this issue Feb 15, 2019
aaronjensen added a commit to aaronjensen/plugin-ruby that referenced this issue Feb 15, 2019
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