Open FrankKai opened 6 years ago
写好代码注释,可以很大程度上增强代码可读性。 所以我将在这个issue记录关于注释的知识和实践。
参考资料: https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments https://github.com/fex-team/styleguide/blob/master/javascript.md#24-%E6%B3%A8%E9%87%8A https://github.com/airbnb/javascript#comments https://zh-google-styleguide.readthedocs.io/en/latest/google-cpp-styleguide/comments/
Better Comments是一款vscode插件,可以使得我们的注释更加human-friendly。 它主要将注释分为以下几类:
*
!
?
TODO:
@param
可以通过/** **/和//两种方式包裹注释。 除此之外,它还包括:已注释代码加横线,高亮注释。
/** **/
//
写好代码注释,可以很大程度上增强代码可读性。 所以我将在这个issue记录关于注释的知识和实践。
参考资料: https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments https://github.com/fex-team/styleguide/blob/master/javascript.md#24-%E6%B3%A8%E9%87%8A https://github.com/airbnb/javascript#comments https://zh-google-styleguide.readthedocs.io/en/latest/google-cpp-styleguide/comments/