mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
doc: activate no-multiple-empty-lines rule
This enables the `no-multiple-empty-lines` eslint rule for the docs. PR-URL: https://github.com/nodejs/node/pull/18747 Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com>
This commit is contained in:
1 parent
adca631f8a
commit
ebd73ad27a
2 files changed
+3
-8
No files matched your search
@@ -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}]
|
||||
@@ -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: <Buffer 02 01 04 03 06 05 08 07>
|
||||
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: <Buffer 04 03 02 01 08 07 06 05>
|
||||
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: <Buffer 08 07 06 05 04 03 02 01>
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user