diff --git a/docs/src/rules/guard-for-in.md b/docs/src/rules/guard-for-in.md index 9481d2ad07f..f358e503039 100644 --- a/docs/src/rules/guard-for-in.md +++ b/docs/src/rules/guard-for-in.md @@ -44,6 +44,12 @@ Examples of **correct** code for this rule: ```js /*eslint guard-for-in: "error"*/ +for (key in foo) { + if (Object.hasOwn(foo, key)) { + doSomething(key); + } +} + for (key in foo) { if (Object.prototype.hasOwnProperty.call(foo, key)) { doSomething(key);