-
Notifications
You must be signed in to change notification settings - Fork 282
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
Standardize code formatting #378
Conversation
@rexagod im going to standardize the code formatting so that all src files use 2 space indent, and all test files use 4 space indent, because right now it is not standard for every file. |
Sounds good! And what are your thoughts on using a linter to enforce such style in the future? We can add Or better yet, use husky to add pre-commit hooks that check linting? That should automate the formatting stuff for us. |
@rexagod Ok that sounds like a much better idea than this PR do you want to open one with Husky? |
@sashadev-sky On it! |
Okay just a question before I push on this, do you want to apply linting only for the spacing stuff, or do you think it'd be better to apply an already existing linting style to this lib? |
@rexagod oh really good idea!! I tend to look up google's style guide for best practice, but if you have experience with using a particular one and prefer it let's use that! Also don't know the diff but in the past Airbnb style guide was recommended to me. This is actually an important maintenance move that i've been thinking we should do for a while so glad we're getting to it |
@sashadev-sky Also, I would recommend you to install the eslint extension so that you can easily see the errors/warnings as you type. |
Actually let me just fix those warnings too. |
Done! |
@rexagod awesme im gonna pull this and check it out. i guess i will rebase it to because that was all me.. 😫 |
@rexagod wait how are you using |
@rexagod tests are not passing. I believe this is due to your usage of |
@sashadev-sky Check now. |
@rexagod ok awesome! Thank you!!! I am going to rebase and merge this an open a follow-up about some questions I have |
node_modules | ||
test/src/util | ||
test/src/*Spec.js | ||
Gruntfile.js |
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.
Why do we want to be ignoring Gruntfile.js
?
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.
Ohh its .eslintignore gotchya
actually @rexagod I left a review comment that I would like to address quickly before merge |
e94399f
to
ff1ddd5
Compare
Ok this is ready! Disregard last comment. I'll open the follow up :) |
* single space code * added lint hooks * format files * fix tests
* single space code * added lint hooks * format files * fix tests
Fixes #0000 (<=== Add issue number here)
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
grunt
If tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
Thanks!
formatting: