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 editorconfig and prettier to project #533

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mattcoleanderson
Copy link

@mattcoleanderson mattcoleanderson commented Feb 14, 2024

There are many styling inconsistencies through the project:

  • Files with mixed tabs and spaces
  • Files with different indentation levels
  • mixed used of double and single quotes
  • etc.

This is a common result of open source projects that without formatter/linter due to different editor setups per user.

In this PR I've added an editorconfig for live formatting and prettier for post formatting.

I've also added a precommit hook to run prettier on all staged files upon a commit. This will further ensure styling stays consistent.

I've gone ahead and ran prettier against the entire code base to fix all styling issues via npx prettier . --write. However, some of the styling choices I've made are arbitrary and are absolutely up for discussion.

@ShootingKing-AM
Copy link
Member

Awesome! Thought of doing this myself as it's very important. Didn't check out the pr yet. Will merge asap.

@ShootingKing-AM ShootingKing-AM mentioned this pull request Feb 16, 2024
@ShootingKing-AM
Copy link
Member

Seems like some tests are failing

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.

None yet

2 participants