You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
3.3 KiB

8 years ago
  1. # Contributing Guidelines
  2. ## Code of Conduct
  3. This is probably way overkill, but this is by far my most active project in
  4. terms of contributions, and somewhere along the way I was convinced that it
  5. was a good idea to have this in place sooner rather than later:
  6. I want to provide a safe, healthy environment for all contributors/participants
  7. regardless of gender, sexual orientation, disability, race, religion, etc.
  8. As such, I don't tolerate harassment of participants in any form. In particular
  9. this applies to my issues tracker, but also to any other means of communication
  10. associated with this project that might come up. Anyone who violates these
  11. basic rules may be sanctioned/banned/have-their-comments-deleted/etc by my
  12. discretion.
  13. Glad we cleared that up.
  14. ## Branching
  15. Before working on your fix/feature/whatever, you should create a new branch to
  16. work on. Do something like:
  17. ```sh
  18. $ git checkout -b 'my-sweet-new-pull-request'
  19. ```
  20. ## Please Please Please Start With A Test
  21. ecstatic has some pretty gnarly branching/logic underneath. Tests are extremely
  22. important because they (a) prove that your feature/fix works, and (b) avoid
  23. regressions in the future. Even if your patch is problematic enough to not be
  24. merged, a test will still be very helpful for confirming any future fix.
  25. I won't reject your patch outright if it's missing new tests, but it sure
  26. helps!
  27. ## Code Style
  28. Ecstatic's code base follows a relatively consistent style. The closer your
  29. patch blends in with the status quo, the better.
  30. A few PROTIPS off the top of my head:
  31. 1. Variables don't need to all be declared at the top, BUT variable *blocks*
  32. should do the whole one-var, tons-of-commas thing.
  33. 2. Look at how spacing is done around conditionals and functions. Do it like
  34. that.
  35. 3. `else`'s and similar should be on the line *after* the preceding bracket.
  36. We can refine this as the need arises.
  37. ## A Few Other Minor Guidelines
  38. 1. Keep your pull requests on-topic. A pull request purporting to tackle A
  39. shouldn't also have commits changing B and C. Feel free to make separate pull
  40. requests. For instance: A pull request should generally only update
  41. dependencies when doing so is required to add the feature or fix the bug. This
  42. feature can, of course, consist of updating dependencies.
  43. 2. I prefer maintaining the changelog and package.json version myself. This is
  44. because I try to make a single commit for a tagged release contain all
  45. changelog additions and the version bump, and this breaks down when there are
  46. interstitial commits making updates to either.
  47. 3. In case you were wondering about dependencies, you may find this helpful:
  48. [![dependencies status](https://david-dm.org/jfhbrook/node-ecstatic.svg)](https://david-dm.org/jfhbrook/node-ecstatic)
  49. 4. Please add yourself to CONTRIBUTORS.md if you haven't done so! Fill in as
  50. much as makes you comfortable.
  51. ## Pull Request
  52. Make a pull request against master with your new branch. Explain briefly what
  53. the patch does to the code, along with any concerns.
  54. (If you don't have a description, it's hard for me to put the changes in
  55. context. That makes it more difficult for me to merge!)
  56. ## Keep It Moving
  57. I don't always notice new PRs, and sometimes I will forget to follow up on
  58. them. If this happens to you, you can bump the PR thread or find me on
  59. IRC or twitter.
  60. ## LAST RULE
  61. HAVE FUN :v :v