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

Add prettier, specify files for npm publish #11

Merged
merged 6 commits into from
Feb 28, 2024
Merged

Add prettier, specify files for npm publish #11

merged 6 commits into from
Feb 28, 2024

Conversation

perry-mitchell
Copy link
Contributor

@perry-mitchell perry-mitchell commented Feb 23, 2024

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.

Copy link
Owner

@levansuper levansuper left a 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.

.prettierrc Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@perry-mitchell
Copy link
Contributor Author

@levansuper Updated as per your requests! I re-formatted the code and added .editorconfig to ensure that people using the plugin (I do) abide by some of these requirements automatically.

Copy link
Owner

@levansuper levansuper left a 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
Copy link
Owner

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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.

Copy link
Owner

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@levansuper levansuper merged commit c38e1ea into levansuper:master Feb 28, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants