diff --git a/doc/.eslintrc.yaml b/doc/.eslintrc.yaml index 8038836fe310db..c8c1612e3a100b 100644 --- a/doc/.eslintrc.yaml +++ b/doc/.eslintrc.yaml @@ -12,3 +12,6 @@ rules: no-var: error prefer-const: error prefer-rest-params: error + + # Stylistic Issues + no-multiple-empty-lines: [error, {max: 1, maxEOF: 0, maxBOF: 0}] diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 6f31cbdc55cf3e..18209a81d264a1 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -497,7 +497,6 @@ console.log(buf1.toString()); // Prints: this is a tC)st console.log(buf1.toString('ascii')); - const buf2 = new Buffer('7468697320697320612074c3a97374', 'hex'); // Prints: this is a tést @@ -906,7 +905,6 @@ console.log(buf1.toString()); // Prints: this is a tC)st console.log(buf1.toString('ascii')); - const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); // Prints: this is a tést @@ -1366,7 +1364,6 @@ console.log(buf.indexOf(Buffer.from('a buffer example'))); // Prints: 8 console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8))); - const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2'); // Prints: 4 @@ -1477,7 +1474,6 @@ console.log(buf.lastIndexOf('buffer', 5)); // Prints: -1 console.log(buf.lastIndexOf('buffer', 4)); - const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2'); // Prints: 6 @@ -2000,7 +1996,6 @@ buf1.swap16(); // Prints: console.log(buf1); - const buf2 = Buffer.from([0x1, 0x2, 0x3]); // Throws an exception: RangeError: Buffer size must be a multiple of 16-bits @@ -2030,7 +2025,6 @@ buf1.swap32(); // Prints: console.log(buf1); - const buf2 = Buffer.from([0x1, 0x2, 0x3]); // Throws an exception: RangeError: Buffer size must be a multiple of 32-bits @@ -2060,7 +2054,6 @@ buf1.swap64(); // Prints: console.log(buf1); - const buf2 = Buffer.from([0x1, 0x2, 0x3]); // Throws an exception: RangeError: Buffer size must be a multiple of 64-bits @@ -2132,7 +2125,6 @@ console.log(buf1.toString('ascii')); // Prints: abcde console.log(buf1.toString('ascii', 0, 5)); - const buf2 = Buffer.from('tést'); // Prints: 74c3a97374