All code comments have to written in JavaDoc or Doxygen style.
You have to comment code in these cases:
- Too logic overloaded method
- Too many arguments in functions and methods in your code (more than 5)
- If you use "bad practice" code (you should write a comment message which have to contain this questions answers: where, why and what)
- You especially love writing documentation comments :)
- You use short variable name which don't contain clear meaning for what they be.
As JS code style standard was taken Airbnb JavaScript Style Guide
We use Basarat style guide
Standard Airbnb React/JSX Style Guide