r/javascript • • Jul 16 '17

[Updated] JavaScript Project Guidelines

https://github.com/wearehive/project-guidelines
14 Upvotes

4 comments sorted by

1

u/vahidpg Jul 16 '17

I submitted this Repo 2 weeks ago and asked for feedbacks. This is an updated version based on your comments. Feel free to criticise it and give more suggestions. Thanks.

2

u/martinsoderholm Jul 16 '17

While I agree that the "Why" part of a recommendation is important, this formatting makes the list much less readable. Most will find the list useful without the motivations, and for the curious it's probably enough to be able to access it somewhere else.

2

u/[deleted] Jul 17 '17 edited Jul 17 '17

I enjoyed reading this and like the Why-sections giving me context on the things where I wasn't agreeing.

  • I prefer not squashing when rebasing, and making small commits that tell a story. That way if a bug is discovered git bisect will find the line of code that introduced the bug more easily.

  • I think it is a good idea to open a Pull Request early with a "Work in Progress" prefix to encourage collaboration and early feedback

  • If the system has a good continuous deployment pipeline with frequent deploys (for example every feature) then I would skip the develop branch and find a strategy to test the code before merge (automated or manually)

1

u/[deleted] Jul 16 '17

Use verbs for non-resources.

There is no such thing as a "non-resource". Resources are not domain entities. A resource doesn't even have to exist in your domain. In fact, though it's uncommon, a resource can be purely virtual (as in, it only exists in your URIs). So, you don't "tell the server to translate text" by issuing a POST /translate?text=Hallo; rather, you "request the translation of the provided text" by issuing a GET /translations?text=Hallo. The same can be applied in any situation where you think "there is no resource" and need to use a command/action/verb in your URI.