mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02: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:
parent
826844e27e
commit
cc195bf37b
6 changed files with 12 additions and 9 deletions
|
@ -24,8 +24,9 @@ const vals = [new T(4), T(4)];
|
|||
|
||||
vals.forEach(function(t) {
|
||||
assert.equal(t.constructor, T);
|
||||
assert.equal(t.__proto__, T.prototype);
|
||||
assert.equal(t.__proto__.__proto__, Buffer.prototype);
|
||||
assert.equal(Object.getPrototypeOf(t), T.prototype);
|
||||
assert.equal(Object.getPrototypeOf(Object.getPrototypeOf(t)),
|
||||
Buffer.prototype);
|
||||
|
||||
t.fill(5);
|
||||
let cntr = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue