summaryrefslogtreecommitdiff
path: root/doc/STYLE_GUIDE.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/STYLE_GUIDE.md')
-rw-r--r--doc/STYLE_GUIDE.md12
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