Open wildskyf opened 5 years ago
no semicolon, but If there is a line start with ()
or []
(also, regex
, +
, -
), we add a semicolon in the beginning of the line.
ref: https://www.zhihu.com/question/20298345/answer/49551142
we could also use https://github.com/yyx990803/semi and git pre-commit hook to ensure we have same coding style.
https://standardjs.com/ this is my favorite :D.
It also provides a formatter to fix style automatically for you.
ref: https://google.github.io/styleguide/jsguide.html