diff options
author | Gibson Fahnestock <gibfahn@gmail.com> | 2017-06-18 20:53:54 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2017-09-28 02:26:56 -0300 |
commit | 1175c9dca38e7ce5840dec3905586db9e2bbb4c1 (patch) | |
tree | 524b3f5b897e636f5f490081c70cc22763f2deee /doc/STYLE_GUIDE.md | |
parent | ccfcd8873cf4966380322f89e34ce47441868c9d (diff) | |
download | node-new-1175c9dca38e7ce5840dec3905586db9e2bbb4c1.tar.gz |
doc: standardize function param/object prop style
PR-URL: https://github.com/nodejs/node/pull/13769
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'doc/STYLE_GUIDE.md')
-rw-r--r-- | doc/STYLE_GUIDE.md | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/STYLE_GUIDE.md b/doc/STYLE_GUIDE.md index 34879c1c7c..69bfa86500 100644 --- a/doc/STYLE_GUIDE.md +++ b/doc/STYLE_GUIDE.md @@ -65,8 +65,16 @@ * Make the "Note:" label italic, i.e. `*Note*:`. * Use a capital letter after the "Note:" label. * Preferably, make the note a new paragraph for better visual distinction. +* Function arguments or object properties should use the following format: + * <code>* \`name\` {type|type2} Optional description. \*\*Default:\*\* \`defaultValue\`</code> + * E.g. <code>* `byteOffset` {integer} Index of first byte to expose. **Default:** `0`</code> + * The `type` should refer to a Node.js type or a [JavaScript type][] +* Function returns should use the following format: + * <code>* Returns: {type|type2} Optional description.</code> + * E.g. <code>* Returns: {AsyncHook} A reference to `asyncHook`.</code> -[plugin]: http://editorconfig.org/#download -[Oxford comma]: https://en.wikipedia.org/wiki/Serial_comma [Em dashes]: https://en.wikipedia.org/wiki/Dash#Em_dash +[Javascript type]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#Data_structures_and_types +[Oxford comma]: https://en.wikipedia.org/wiki/Serial_comma [The New York Times Manual of Style and Usage]: https://en.wikipedia.org/wiki/The_New_York_Times_Manual_of_Style_and_Usage +[plugin]: http://editorconfig.org/#download |