ESLint(no-prototype-builtins)
// eslint-disable-next-line no-prototype-builtins
if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) return 0;
no-prototype-builtins - Rules - ESLint - Pluggable JavaScript linter
Rule Details
This rule disallows calling some Object.prototype
methods directly on object instances.
Examples of incorrect code for this rule:
1 | /*eslint no-prototype-builtins: "error"*/ |
Examples of correct code for this rule:
1 | /*eslint no-prototype-builtins: "error"*/ |