test: apply eslint exceptions narrowly

In test-util-inspect, apply ESLint exception for accessor-pairs rule
narrowly. It had been applied to nearly the whole file, but is only
needed for two lines.

PR-URL: https://github.com/nodejs/node/pull/16393
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Rich Trott committed 2017-11-16 21:59:36 -08:00
1 parent d6ac8a4db0
commit 60698c2455
1 file changed
+2 -4
+2 -4
View File
@@ -26,8 +26,6 @@ const JSStream = process.binding('js_stream').JSStream;
const util = require('util');
const vm = require('vm');
/* eslint-disable accessor-pairs */
assert.strictEqual(util.inspect(1), '1');
assert.strictEqual(util.inspect(false), 'false');
assert.strictEqual(util.inspect(''), "''");
@@ -280,6 +278,7 @@ assert.strictEqual(
'{ readwrite: [Getter/Setter] }');
assert.strictEqual(
// eslint-disable-next-line accessor-pairs
util.inspect({ set writeonly(val) {} }),
'{ writeonly: [Setter] }');
@@ -476,7 +475,7 @@ assert.strictEqual(util.inspect(-0), '-0');
}
});
const setter = Object.create(null, {
b: {
b: { // eslint-disable-line accessor-pairs
set: function() {}
}
});
@@ -1151,4 +1150,3 @@ if (typeof Symbol !== 'undefined') {
}
assert.doesNotThrow(() => util.inspect(process));
/* eslint-enable accessor-pairs */