-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add prettier, specify files for npm publish #11
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@perry-mitchell Thanks for your involvement!
Just a couple of issues that I have with the PR.
Also, please run npm run format
after the rule changes so that all the code is formatted properly.
@levansuper Updated as per your requests! I re-formatted the code and added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last change and I think we are good to merge this
.editorconfig
Outdated
|
||
[{package.json,package-lock.json}] | ||
indent_size = 2 | ||
indent_style = space |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not use this please. This lib is not intended be opened in the editor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand.. How do you edit the source code if not in an editor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editorconfig is a standard for any editor to help conform to a specific set of requirements. It'd probably help avoid simple stylistic issues for future PRs.
But if you don't think it's beneficial to this library I can remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The IDEs can pick the config from .prettierrc and it will be prettified on commits anyway, so I think this is not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Hello! Nice library. I'm using it myself, and wanted to help out.
I've added fixes to address #8 and #9. Basic prettier setup with a
format
command and git hooks to help do formatting automatically when you commit. I chose some basic prettier options to hopefully match your style, such as 4 space indent and single quotes. Please let me know if you'd have me change anything and I can update them for the PR.