Skip to content

Commit ebd73ad

Browse files
BridgeARMylesBorins
authored andcommitted
doc: activate no-multiple-empty-lines rule
This enables the `no-multiple-empty-lines` eslint rule for the docs. PR-URL: #18747 Reviewed-By: Weijia Wang <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matheus Marchini <[email protected]>
1 parent adca631 commit ebd73ad

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

doc/.eslintrc.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ rules:
1212
no-var: error
1313
prefer-const: error
1414
prefer-rest-params: error
15+
16+
# Stylistic Issues
17+
no-multiple-empty-lines: [error, {max: 1, maxEOF: 0, maxBOF: 0}]

doc/api/buffer.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,6 @@ console.log(buf1.toString());
497497
// Prints: this is a tC)st
498498
console.log(buf1.toString('ascii'));
499499

500-
501500
const buf2 = new Buffer('7468697320697320612074c3a97374', 'hex');
502501

503502
// Prints: this is a tést
@@ -906,7 +905,6 @@ console.log(buf1.toString());
906905
// Prints: this is a tC)st
907906
console.log(buf1.toString('ascii'));
908907

909-
910908
const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
911909

912910
// Prints: this is a tést
@@ -1366,7 +1364,6 @@ console.log(buf.indexOf(Buffer.from('a buffer example')));
13661364
// Prints: 8
13671365
console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8)));
13681366

1369-
13701367
const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2');
13711368

13721369
// Prints: 4
@@ -1477,7 +1474,6 @@ console.log(buf.lastIndexOf('buffer', 5));
14771474
// Prints: -1
14781475
console.log(buf.lastIndexOf('buffer', 4));
14791476

1480-
14811477
const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2');
14821478

14831479
// Prints: 6
@@ -2000,7 +1996,6 @@ buf1.swap16();
20001996
// Prints: <Buffer 02 01 04 03 06 05 08 07>
20011997
console.log(buf1);
20021998

2003-
20041999
const buf2 = Buffer.from([0x1, 0x2, 0x3]);
20052000

20062001
// Throws an exception: RangeError: Buffer size must be a multiple of 16-bits
@@ -2030,7 +2025,6 @@ buf1.swap32();
20302025
// Prints: <Buffer 04 03 02 01 08 07 06 05>
20312026
console.log(buf1);
20322027

2033-
20342028
const buf2 = Buffer.from([0x1, 0x2, 0x3]);
20352029

20362030
// Throws an exception: RangeError: Buffer size must be a multiple of 32-bits
@@ -2060,7 +2054,6 @@ buf1.swap64();
20602054
// Prints: <Buffer 08 07 06 05 04 03 02 01>
20612055
console.log(buf1);
20622056

2063-
20642057
const buf2 = Buffer.from([0x1, 0x2, 0x3]);
20652058

20662059
// Throws an exception: RangeError: Buffer size must be a multiple of 64-bits
@@ -2132,7 +2125,6 @@ console.log(buf1.toString('ascii'));
21322125
// Prints: abcde
21332126
console.log(buf1.toString('ascii', 0, 5));
21342127

2135-
21362128
const buf2 = Buffer.from('tést');
21372129

21382130
// Prints: 74c3a97374

0 commit comments

Comments
 (0)