node/doc
Myles Borins 89322aed7e
2023-02-21, Version 19.7.0 (Current)
Notable changes:

deps:
  * upgrade npm to 9.5.0 (npm team) https://github.com/nodejs/node/pull/46673
  * add ada as a dependency (Yagiz Nizipli) https://github.com/nodejs/node/pull/46410
doc:
  * add debadree25 to collaborators (Debadree Chatterjee) https://github.com/nodejs/node/pull/46716
  * add deokjinkim to collaborators (Deokjin Kim) https://github.com/nodejs/node/pull/46444
doc,lib,src,test:
  * rename --test-coverage (Colin Ihrig) https://github.com/nodejs/node/pull/46017
lib:
  * (SEMVER-MINOR) add aborted() utility function (Debadree Chatterjee) https://github.com/nodejs/node/pull/46494
src:
  * (SEMVER-MINOR) add initial support for single executable applications (Darshan Sen) https://github.com/nodejs/node/pull/45038
  * (SEMVER-MINOR) allow optional Isolate termination in node::Stop() (Shelley Vohr) https://github.com/nodejs/node/pull/46583
  * (SEMVER-MINOR) allow blobs in addition to `FILE*`s in embedder snapshot API (Anna Henningsen) https://github.com/nodejs/node/pull/46491
  * (SEMVER-MINOR) allow snapshotting from the embedder API (Anna Henningsen) https://github.com/nodejs/node/pull/45888
  * (SEMVER-MINOR) make build_snapshot a per-Isolate option, rather than a global one (Anna Henningsen) https://github.com/nodejs/node/pull/45888
  * (SEMVER-MINOR) add snapshot support for embedder API (Anna Henningsen) https://github.com/nodejs/node/pull/45888
  * (SEMVER-MINOR) allow embedder control of code generation policy (Shelley Vohr) https://github.com/nodejs/node/pull/46368
stream:
  * (SEMVER-MINOR) add abort signal for ReadableStream and WritableStream (Debadree Chatterjee) https://github.com/nodejs/node/pull/46273
test_runner:
  * add initial code coverage support (Colin Ihrig) https://github.com/nodejs/node/pull/46017
url:
  * replace url-parser with ada (Yagiz Nizipli) https://github.com/nodejs/node/pull/46410

PR-URL: https://github.com/nodejs/node/pull/46725
2023-02-21 13:12:58 -05:00
..
api 2023-02-21, Version 19.7.0 (Current) 2023-02-21 13:12:58 -05:00
api_assets doc: add lint rule to enforce trailing commas 2022-11-17 13:19:12 +00:00
changelogs 2023-02-21, Version 19.7.0 (Current) 2023-02-21 13:12:58 -05:00
contributing doc: maintaining nghttp2 2023-02-21 17:45:10 +00:00
.eslintrc.yaml tools: enforce use of trailing commas in tools/ 2022-12-18 16:39:39 +00:00
abi_version_registry.json doc: add registry number for Electron 23 & 24 2022-11-30 18:56:00 +00:00
first_timer_badge.png
full-white-stripe.jpg
node.1 doc,lib,src,test: rename --test-coverage 2023-01-08 16:10:00 -05:00
osx_installer_logo.png
README.md doc: document goal to have examples 2022-03-18 15:29:10 -04:00
template.html tools: fix CJS/ESM toggle on small screens 2022-06-27 18:31:44 +02:00
thin-white-stripe.jpg

Documentation style guide

This style guide helps us create organized and easy-to-read documentation. It provides guidelines for organization, spelling, formatting, and more.

These are guidelines rather than strict rules. Content is more important than formatting. You do not need to learn the entire style guide before contributing to documentation. Someone can always edit your material later to conform with this guide.

  • Documentation is in markdown files with names formatted as lowercase-with-dashes.md.
    • Use an underscore in the filename only if the underscore is part of the topic name (e.g., child_process).
    • Some files, such as top-level markdown files, are exceptions.
  • Documents should be word-wrapped at 80 characters.
  • .editorconfig describes the preferred formatting.
    • A plugin is available for some editors to apply these rules.
  • Check changes to documentation with make test-doc -j or vcbuild test-doc.
  • Use US spelling.
  • Use serial commas.
  • Avoid first-person pronouns (I, we).
    • Exception: we recommend foo is preferable to foo is recommended.
  • Use gender-neutral pronouns and gender-neutral plural nouns.
    • OK: they, their, them, folks, people, developers
    • NOT OK: his, hers, him, her, guys, dudes
  • When combining wrapping elements (parentheses and quotes), place terminal punctuation:
    • Inside the wrapping element if the wrapping element contains a complete clause.
    • Outside of the wrapping element if the wrapping element contains only a fragment of a clause.
  • Documents must start with a level-one heading.
  • Prefer affixing links ([a link][]) to inlining links ([a link](http://example.com)).
  • When documenting APIs, update the YAML comment associated with the API as appropriate. This is especially true when introducing or deprecating an API.
  • When documenting APIs, every function should have a usage example or link to an example that uses the function.
  • For code blocks:
    • Use language-aware fences. (```js)

    • For the info string, use one of the following.

      Meaning Info string
      Bash bash
      C c
      C++ cpp
      CoffeeScript coffee
      Diff diff
      HTTP http
      JavaScript js
      JSON json
      Markdown markdown
      Plaintext text
      Powershell powershell
      R r
      Shell Session console

      If one of your language-aware fences needs an info string that is not already on this list, you may use text until the grammar gets added to remark-preset-lint-node.

    • Code need not be complete. Treat code blocks as an illustration or aid to your point, not as complete running programs. If a complete running program is necessary, include it as an asset in assets/code-examples and link to it.

  • When using underscores, asterisks, and backticks, please use backslash-escaping: \_, \*, and \` .
  • Constructors should use PascalCase.
  • Instances should use camelCase.
  • Denote methods with parentheses: socket.end() instead of socket.end.
  • Function arguments or object properties should use the following format:
    • * `name` {type|type2} Optional description. **Default:** `value`.
    • For example: * byteOffset {integer} Index of first byte to expose. Default: 0.
  • Function returns should use the following format:
    • * Returns: {type|type2} Optional description.
    • E.g. * Returns: {AsyncHook} A reference to asyncHook.
  • Use official styling for capitalization in products and projects.
    • OK: JavaScript, Google's V8
    • NOT OK: Javascript, Google's v8
  • Use Node.js and not Node, NodeJS, or similar variants.
    • When referring to the executable, node is acceptable.
  • Be direct.
  • When referring to a version of Node.js in prose, use Node.js and the version number. Do not prefix the version number with v in prose. This is to avoid confusion about whether v8 refers to Node.js 8.x or the V8 JavaScript engine.
    • OK: Node.js 14.x, Node.js 14.3.1
    • NOT OK: Node.js v14
  • Use sentence-style capitalization for headings.

See also API documentation structure overview in doctools README.

For topics not covered here, refer to the Microsoft Writing Style Guide.