diff --git a/.eslintrc.js b/.eslintrc.js index 65b7f170280450..14c54a477a7014 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -297,7 +297,6 @@ module.exports = { // ESLint recommended rules that we disable 'no-empty': 'off', 'no-inner-declarations': 'off', - 'no-prototype-builtins': 'off', // JSDoc recommended rules that we disable 'jsdoc/require-jsdoc': 'off', diff --git a/test/js-native-api/test_object/test_null.js b/test/js-native-api/test_object/test_null.js index c94aa0fc84f19d..b6f07881080e7c 100644 --- a/test/js-native-api/test_object/test_null.js +++ b/test/js-native-api/test_object/test_null.js @@ -14,6 +14,7 @@ const expectedForProperty = { assert.deepStrictEqual(testNull.setProperty(), expectedForProperty); assert.deepStrictEqual(testNull.getProperty(), expectedForProperty); assert.deepStrictEqual(testNull.hasProperty(), expectedForProperty); +// eslint-disable-next-line no-prototype-builtins assert.deepStrictEqual(testNull.hasOwnProperty(), expectedForProperty); // It's OK not to want the result of a deletion. assert.deepStrictEqual(testNull.deleteProperty(), diff --git a/test/parallel/test-console-group.js b/test/parallel/test-console-group.js index 9b7e836a436add..f1274a9bce6637 100644 --- a/test/parallel/test-console-group.js +++ b/test/parallel/test-console-group.js @@ -151,7 +151,7 @@ function teardown() { // Check that the kGroupIndent symbol property is not enumerable { const keys = Reflect.ownKeys(console) - .filter((val) => console.propertyIsEnumerable(val)) + .filter((val) => Object.prototype.propertyIsEnumerable.call(console, val)) .map((val) => val.toString()); assert(!keys.includes('Symbol(groupIndent)'), 'groupIndent should not be enumerable'); diff --git a/test/parallel/test-stream-base-prototype-accessors-enumerability.js b/test/parallel/test-stream-base-prototype-accessors-enumerability.js index d060a0cb84ce50..1a7f6808fe1780 100644 --- a/test/parallel/test-stream-base-prototype-accessors-enumerability.js +++ b/test/parallel/test-stream-base-prototype-accessors-enumerability.js @@ -14,8 +14,8 @@ const { internalBinding } = require('internal/test/binding'); const TTY = internalBinding('tty_wrap').TTY; { - assert.strictEqual(TTY.prototype.propertyIsEnumerable('bytesRead'), false); - assert.strictEqual(TTY.prototype.propertyIsEnumerable('fd'), false); - assert.strictEqual( - TTY.prototype.propertyIsEnumerable('_externalStream'), false); + const ttyIsEnumerable = Object.prototype.propertyIsEnumerable.bind(TTY); + assert.strictEqual(ttyIsEnumerable('bytesRead'), false); + assert.strictEqual(ttyIsEnumerable('fd'), false); + assert.strictEqual(ttyIsEnumerable('_externalStream'), false); }