[doc] add eslint rule reference for no-prototype-builtins

This commit is contained in:
Pirasis Leelatanon
2018-10-03 23:56:48 +07:00
committed by GitHub
parent 9af5ee89eb
commit 924dfb2682

View File

@@ -285,7 +285,7 @@ Other Style Guides
```
<a name="objects--prototype-builtins"></a>
- [3.7](#objects--prototype-builtins) Do not call `Object.prototype` methods directly, such as `hasOwnProperty`, `propertyIsEnumerable`, and `isPrototypeOf`.
- [3.7](#objects--prototype-builtins) Do not call `Object.prototype` methods directly, such as `hasOwnProperty`, `propertyIsEnumerable`, and `isPrototypeOf`. eslint: [`no-prototype-builtins`](https://eslint.org/docs/rules/no-prototype-builtins)
> Why? These methods may be shadowed by properties on the object in question - consider `{ hasOwnProperty: false }` - or, the object may be a null object (`Object.create(null)`).