summaryrefslogtreecommitdiff
path: root/lib/internal
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-12-10 13:27:32 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2018-12-17 17:14:35 +0100
commit50dd555910ed0338c35f27ee57e947b9ec95724c (patch)
tree73a0d59eb5b1087afa4c42bc667bb268f1a23b72 /lib/internal
parentbe3ae339360c9833a77ebf5772786d75b7a8dd78 (diff)
downloadandroid-node-v8-50dd555910ed0338c35f27ee57e947b9ec95724c.tar.gz
android-node-v8-50dd555910ed0338c35f27ee57e947b9ec95724c.tar.bz2
android-node-v8-50dd555910ed0338c35f27ee57e947b9ec95724c.zip
doc,lib,test: capitalize comment sentences
This activates the eslint capitalize comment rule for comments above 50 characters. PR-URL: https://github.com/nodejs/node/pull/24996 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/internal')
-rw-r--r--lib/internal/child_process.js4
-rw-r--r--lib/internal/console/constructor.js2
-rw-r--r--lib/internal/fs/streams.js12
-rw-r--r--lib/internal/http2/compat.js2
-rw-r--r--lib/internal/http2/core.js4
-rw-r--r--lib/internal/modules/cjs/loader.js6
-rw-r--r--lib/internal/modules/esm/loader.js4
-rw-r--r--lib/internal/process/next_tick.js2
-rw-r--r--lib/internal/process/stdio.js4
-rw-r--r--lib/internal/streams/destroy.js2
-rw-r--r--lib/internal/timers.js2
11 files changed, 22 insertions, 22 deletions
diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js
index b8743c0a51..195cc156fc 100644
--- a/lib/internal/child_process.js
+++ b/lib/internal/child_process.js
@@ -105,7 +105,7 @@ const handleConversion = {
var firstTime = !this.channel.sockets.send[message.key];
var socketList = getSocketList('send', this, message.key);
- // the server should no longer expose a .connection property
+ // The server should no longer expose a .connection property
// and when asked to close it should query the socket status from
// the workers
if (firstTime) socket.server._setupWorker(socketList);
@@ -254,7 +254,7 @@ function ChildProcess() {
this.emit('exit', this.exitCode, this.signalCode);
}
- // if any of the stdio streams have not been touched,
+ // If any of the stdio streams have not been touched,
// then pull all the data through so that it can get the
// eof and emit a 'close' event.
// Do it on nextTick so that the user has one last chance
diff --git a/lib/internal/console/constructor.js b/lib/internal/console/constructor.js
index da54dd11a7..c2cf1fc48c 100644
--- a/lib/internal/console/constructor.js
+++ b/lib/internal/console/constructor.js
@@ -100,7 +100,7 @@ function Console(options /* or: stdout, stderr, ignoreErrors = true */) {
optionsMap.set(this, inspectOptions);
}
- // bind the prototype functions to this Console instance
+ // Bind the prototype functions to this Console instance
var keys = Object.keys(Console.prototype);
for (var v = 0; v < keys.length; v++) {
var k = keys[v];
diff --git a/lib/internal/fs/streams.js b/lib/internal/fs/streams.js
index 059f203597..98d256f696 100644
--- a/lib/internal/fs/streams.js
+++ b/lib/internal/fs/streams.js
@@ -40,17 +40,17 @@ function ReadStream(path, options) {
if (!(this instanceof ReadStream))
return new ReadStream(path, options);
- // a little bit bigger buffer and water marks by default
+ // A little bit bigger buffer and water marks by default
options = copyObject(getOptions(options, {}));
if (options.highWaterMark === undefined)
options.highWaterMark = 64 * 1024;
- // for backwards compat do not emit close on destroy.
+ // For backwards compat do not emit close on destroy.
options.emitClose = false;
Readable.call(this, options);
- // path will be ignored when fd is specified, so it can be falsy
+ // Path will be ignored when fd is specified, so it can be falsy
this.path = toPathIfFileURL(path);
this.fd = options.fd === undefined ? null : options.fd;
this.flags = options.flags === undefined ? 'r' : options.flags;
@@ -197,7 +197,7 @@ ReadStream.prototype._read = function(n) {
}
});
- // move the pool positions, and internal position for reading.
+ // Move the pool positions, and internal position for reading.
if (this.pos !== undefined)
this.pos += toRead;
pool.used += toRead;
@@ -238,12 +238,12 @@ function WriteStream(path, options) {
options = copyObject(getOptions(options, {}));
- // for backwards compat do not emit close on destroy.
+ // For backwards compat do not emit close on destroy.
options.emitClose = false;
Writable.call(this, options);
- // path will be ignored when fd is specified, so it can be falsy
+ // Path will be ignored when fd is specified, so it can be falsy
this.path = toPathIfFileURL(path);
this.fd = options.fd === undefined ? null : options.fd;
this.flags = options.flags === undefined ? 'w' : options.flags;
diff --git a/lib/internal/http2/compat.js b/lib/internal/http2/compat.js
index 1783a48ada..927504621d 100644
--- a/lib/internal/http2/compat.js
+++ b/lib/internal/http2/compat.js
@@ -440,7 +440,7 @@ class Http2ServerResponse extends Stream {
}
get socket() {
- // this is compatible with http1 which removes socket reference
+ // This is compatible with http1 which removes socket reference
// only from ServerResponse but not IncomingMessage
if (this[kState].closed)
return;
diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js
index e27d529068..082bd552c2 100644
--- a/lib/internal/http2/core.js
+++ b/lib/internal/http2/core.js
@@ -564,7 +564,7 @@ function requestOnConnect(headers, options) {
if (options.waitForTrailers)
streamOptions |= STREAM_OPTION_GET_TRAILERS;
- // ret will be either the reserved stream ID (if positive)
+ // `ret` will be either the reserved stream ID (if positive)
// or an error code (if negative)
const ret = session[kHandle].request(headers,
streamOptions,
@@ -2082,7 +2082,7 @@ function startFilePipe(self, fd, offset, length) {
pipe.onunpipe = onFileUnpipe;
pipe.start();
- // exact length of the file doesn't matter here, since the
+ // Exact length of the file doesn't matter here, since the
// stream is closing anyway - just use 1 to signify that
// a write does exist
trackWriteState(self, 1);
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index ee4fffa64a..b70171cc5d 100644
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -219,7 +219,7 @@ function tryExtensions(p, exts, isMain) {
return false;
}
-// find the longest (possibly multi-dot) extension registered in
+// Find the longest (possibly multi-dot) extension registered in
// Module._extensions
function findLongestRegisteredExtension(filename) {
const name = path.basename(filename);
@@ -593,7 +593,7 @@ Module._resolveFilename = function(request, parent, isMain, options) {
paths = Module._resolveLookupPaths(request, parent, true);
}
- // look up the filename first, since that's the cache key.
+ // Look up the filename first, since that's the cache key.
var filename = Module._findPath(request, paths, isMain);
if (!filename) {
// eslint-disable-next-line no-restricted-syntax
@@ -692,7 +692,7 @@ Module.prototype._compile = function(content, filename) {
var inspectorWrapper = null;
if (process._breakFirstLine && process._eval == null) {
if (!resolvedArgv) {
- // we enter the repl if we're not given a filename argument.
+ // We enter the repl if we're not given a filename argument.
if (process.argv[1]) {
resolvedArgv = Module._resolveFilename(process.argv[1], null, false);
} else {
diff --git a/lib/internal/modules/esm/loader.js b/lib/internal/modules/esm/loader.js
index 820b593446..a1a1621909 100644
--- a/lib/internal/modules/esm/loader.js
+++ b/lib/internal/modules/esm/loader.js
@@ -25,11 +25,11 @@ const debug = require('util').debuglog('esm');
* the main module and everything in its dependency graph. */
class Loader {
constructor() {
- // methods which translate input code or other information
+ // Methods which translate input code or other information
// into es modules
this.translators = translators;
- // registry of loaded modules, akin to `require.cache`
+ // Registry of loaded modules, akin to `require.cache`
this.moduleMap = new ModuleMap();
// The resolver has the signature
diff --git a/lib/internal/process/next_tick.js b/lib/internal/process/next_tick.js
index 046449d658..cb0274367a 100644
--- a/lib/internal/process/next_tick.js
+++ b/lib/internal/process/next_tick.js
@@ -81,7 +81,7 @@ function setupNextTick(_setupNextTick, _setupPromises) {
class TickObject {
constructor(callback, args, triggerAsyncId) {
- // this must be set to null first to avoid function tracking
+ // This must be set to null first to avoid function tracking
// on the hidden class, revisit in V8 versions after 6.2
this.callback = null;
this.callback = callback;
diff --git a/lib/internal/process/stdio.js b/lib/internal/process/stdio.js
index 224af28b0f..5e9ff6b260 100644
--- a/lib/internal/process/stdio.js
+++ b/lib/internal/process/stdio.js
@@ -92,8 +92,8 @@ function getMainThreadStdio() {
// For supporting legacy API we put the FD here.
stdin.fd = fd;
- // stdin starts out life in a paused state, but node doesn't
- // know yet. Explicitly to readStop() it to put it in the
+ // `stdin` starts out life in a paused state, but node doesn't
+ // know yet. Explicitly to readStop() it to put it in the
// not-reading state.
if (stdin._handle && stdin._handle.readStop) {
stdin._handle.reading = false;
diff --git a/lib/internal/streams/destroy.js b/lib/internal/streams/destroy.js
index de6bcf9cdb..0c652be9dd 100644
--- a/lib/internal/streams/destroy.js
+++ b/lib/internal/streams/destroy.js
@@ -1,6 +1,6 @@
'use strict';
-// undocumented cb() API, needed for core, not for public API
+// Undocumented cb() API, needed for core, not for public API
function destroy(err, cb) {
const readableDestroyed = this._readableState &&
this._readableState.destroyed;
diff --git a/lib/internal/timers.js b/lib/internal/timers.js
index fc9979e4b5..3eb7192e2b 100644
--- a/lib/internal/timers.js
+++ b/lib/internal/timers.js
@@ -69,7 +69,7 @@ function Timeout(callback, after, args, isRepeat) {
this._idlePrev = this;
this._idleNext = this;
this._idleStart = null;
- // this must be set to null first to avoid function tracking
+ // This must be set to null first to avoid function tracking
// on the hidden class, revisit in V8 versions after 6.2
this._onTimeout = null;
this._onTimeout = callback;