Skip to content

Commit eccc1db

Browse files
committed
doc,lib,test: capitalize comment sentences
This activates the eslint capitalize comment rule for comments above 50 characters.
1 parent be3ae33 commit eccc1db

File tree

200 files changed

+347
-347
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+347
-347
lines changed

.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ module.exports = {
6060
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
6161
'capitalized-comments': ['error', 'always', {
6262
line: {
63-
// Ignore all lines that have less characters than 62 and all lines that
63+
// Ignore all lines that have less characters than 50 and all lines that
6464
// start with something that looks like a variable name or code.
65-
ignorePattern: '^.{0,62}$|^ [a-z]+ ?[0-9A-Z_.(/=:-]',
65+
ignorePattern: '^.{0,50}$|^ [a-z]+ ?[0-9A-Z_.(/=:[#-]',
6666
ignoreInlineComments: true,
6767
ignoreConsecutiveComments: true
6868
},

benchmark/_benchmark_progress.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class BenchmarkProgress {
4040
this.completedConfig = 0;
4141
// Total number of configurations for the current file
4242
this.scheduledConfig = 0;
43-
this.interval = 0; // result of setInterval for updating the elapsed time
43+
this.interval; // Updates the elapsed time.
4444
}
4545

4646
startQueue(index) {

benchmark/napi/function_args/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// show the difference between calling a V8 binding C++ function
1+
// Show the difference between calling a V8 binding C++ function
22
// relative to a comparable N-API C++ function,
33
// in various types/numbers of arguments.
44
// Reports n of calls per second.

benchmark/napi/function_call/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// show the difference between calling a short js function
1+
// Show the difference between calling a short js function
22
// relative to a comparable C++ function.
33
// Reports n of calls per second.
44
// Note that JS speed goes up, while cxx speed stays about the same.

benchmark/net/net-pipe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function main({ dur, len, type }) {
4848
socket.pipe(writer);
4949

5050
setTimeout(function() {
51-
// multiply by 2 since we're sending it first one way
51+
// Multiply by 2 since we're sending it first one way
5252
// then then back again.
5353
const bytes = writer.received * 2;
5454
const gbits = (bytes * 8) / (1024 * 1024 * 1024);

benchmark/net/tcp-raw-c2s.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ function main({ dur, len, type }) {
4747
}, dur * 1000);
4848

4949
clientHandle.onread = function(buffer) {
50-
// we're not expecting to ever get an EOF from the client.
51-
// just lots of data forever.
50+
// We're not expecting to ever get an EOF from the client.
51+
// Just lots of data forever.
5252
if (!buffer)
5353
fail('read');
5454

55-
// don't slice the buffer. the point of this is to isolate, not
55+
// Don't slice the buffer. The point of this is to isolate, not
5656
// simulate real traffic.
5757
bytes += buffer.byteLength;
5858
};

benchmark/net/tcp-raw-pipe.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ function main({ dur, len, type }) {
4444
fail(err, 'connect');
4545

4646
clientHandle.onread = function(buffer) {
47-
// we're not expecting to ever get an EOF from the client.
48-
// just lots of data forever.
47+
// We're not expecting to ever get an EOF from the client.
48+
// Just lots of data forever.
4949
if (!buffer)
5050
fail('read');
5151

@@ -105,7 +105,7 @@ function main({ dur, len, type }) {
105105
clientHandle.readStart();
106106

107107
setTimeout(function() {
108-
// multiply by 2 since we're sending it first one way
108+
// Multiply by 2 since we're sending it first one way
109109
// then then back again.
110110
bench.end(2 * (bytes * 8) / (1024 * 1024 * 1024));
111111
process.exit(0);

benchmark/net/tcp-raw-s2c.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ function main({ dur, len, type }) {
110110
connectReq.oncomplete = function() {
111111
var bytes = 0;
112112
clientHandle.onread = function(buffer) {
113-
// we're not expecting to ever get an EOF from the client.
114-
// just lots of data forever.
113+
// We're not expecting to ever get an EOF from the client.
114+
// Just lots of data forever.
115115
if (!buffer)
116116
fail('read');
117117

118-
// don't slice the buffer. the point of this is to isolate, not
118+
// Don't slice the buffer. The point of this is to isolate, not
119119
// simulate real traffic.
120120
bytes += buffer.byteLength;
121121
};

benchmark/tls/tls-connect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function makeConnection() {
5959

6060
function done() {
6161
running = false;
62-
// it's only an established connection if they both saw it.
62+
// It's only an established connection if they both saw it.
6363
// because we destroy the server somewhat abruptly, these
6464
// don't always match. Generally, serverConn will be
6565
// the smaller number, but take the min just to be sure.

doc/api/async_hooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function before(asyncId) { }
6969
// After is called just after the resource's callback has finished.
7070
function after(asyncId) { }
7171

72-
// destroy is called when an AsyncWrap instance is destroyed.
72+
// Destroy is called when an AsyncWrap instance is destroyed.
7373
function destroy(asyncId) { }
7474

7575
// promiseResolve is called only for promise resources, when the

0 commit comments

Comments
 (0)