From 91727d33537acfeca4cccfdbff118caf1b0dbc12 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 27 Aug 2018 23:36:19 -0700 Subject: [PATCH 1/2] tools: specify rules disabled in common/dns.js Instead of disabling all ESLint rules for a line, specify the two rules that should be disabled. --- test/common/dns.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/common/dns.js b/test/common/dns.js index 07f84d7a3703c1..7b2f1ef76e2889 100644 --- a/test/common/dns.js +++ b/test/common/dns.js @@ -39,7 +39,7 @@ function readDomainFromPacket(buffer, offset) { } else { // Pointer to another part of the packet. assert.strictEqual(length & 0xC0, 0xC0); - // eslint-disable-next-line + // eslint-disable-next-line space-infix-ops, space-unary-ops const pointeeOffset = buffer.readUInt16BE(offset) &~ 0xC000; return { nread: 2, From 26af2e5640991c1bed7be9b0238abbd08a5f7fed Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 27 Aug 2018 23:37:04 -0700 Subject: [PATCH 2/2] tools: specify rule disabled in test-assert.js Instead of disabling all ESLint rules on two lines in test-assert.js, specify the rule that needs to be disabled. --- test/parallel/test-assert.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index 6aecfc0fe6bf3f..72ba7d24436cae 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -692,7 +692,7 @@ common.expectsError( () => { a( (() => 'string')() - // eslint-disable-next-line + // eslint-disable-next-line operator-linebreak === 123 instanceof Buffer @@ -704,7 +704,7 @@ common.expectsError( message: 'The expression evaluated to a falsy value:\n\n' + ' a(\n' + ' (() => \'string\')()\n' + - ' // eslint-disable-next-line\n' + + ' // eslint-disable-next-line operator-linebreak\n' + ' ===\n' + ' 123 instanceof\n' + ' Buffer\n' + @@ -716,7 +716,7 @@ common.expectsError( () => { a( (() => 'string')() - // eslint-disable-next-line + // eslint-disable-next-line operator-linebreak === 123 instanceof Buffer @@ -728,7 +728,7 @@ common.expectsError( message: 'The expression evaluated to a falsy value:\n\n' + ' a(\n' + ' (() => \'string\')()\n' + - ' // eslint-disable-next-line\n' + + ' // eslint-disable-next-line operator-linebreak\n' + ' ===\n' + ' 123 instanceof\n' + ' Buffer\n' +