# es/no-object-getownpropertynames
disallow the
Object.getOwnPropertyNames
method
- ✅ The following configurations enable this rule:
plugin:es/no-new-in-es5
andplugin:es/restrict-to-es3
This rule reports ES5 Object.getOwnPropertyNames
method as errors.
# Examples
⛔ Examples of incorrect code for this rule:
/*eslint es/no-object-getownpropertynames: error */
Object.getOwnPropertyNames(obj, "prop", {})