frontend-playbook
frontend-playbook copied to clipboard
Provide a couple more examples of acceptable commenting
After a discussion about reasonable use of comments, we thought it worth providing a couple of extra examples of where comments in code are useful (to complement the general rule that code should be self-documenting).
For example, from @morgaan "comment for tricks dictated by business needs"
I always liked "comments should be why, not what". If documenting what the code is doing, that's probably a code smell.