mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
tools: enable no-proto rule for linter
Enable `no-proto` in `.eslintrc`. Use `Object.setPrototypeOf()` and `Object.getPrototypeOf()` instead of. PR-URL: https://github.com/nodejs/node/pull/5140 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
8727d7ac66
commit
fc50bbfa1a
6 files changed
+12
-9
No files matched your search
@@ -40,8 +40,8 @@ assert.equal(dv.getFloat64(8, true), 3.1415);
|
||||
|
||||
assert.throws(function() {
|
||||
function AB() { }
|
||||
AB.__proto__ = ArrayBuffer;
|
||||
AB.prototype.__proto__ = ArrayBuffer.prototype;
|
||||
Object.setPrototypeOf(AB, ArrayBuffer);
|
||||
Object.setPrototypeOf(AB.prototype, ArrayBuffer.prototype);
|
||||
new Buffer(new AB());
|
||||
}, TypeError);
|
||||
|
||||
|
||||
Reference in new issue
Block a user