mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 12:18:30 -05:00
[doc] add eslint rule reference for no-prototype-builtins
This commit is contained in:
committed by
GitHub
parent
9af5ee89eb
commit
924dfb2682
@@ -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)`).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user