Skip to content

Commit 9c9f8f6

Browse files
sophiebitsgaearon
authored andcommitted
Remove 'guard-for-in' lint rule (#1773)
Iterating over an object's keys using `for/in` is idiomatic and it's safe (in all modern browsers) to not check hasOwnProperty as long as the object is a plain object. Can we remove this lint rule?
1 parent 8c00af1 commit 9c9f8f6

File tree

1 file changed

+0
-1
lines changed
  • packages/eslint-config-react-app

1 file changed

+0
-1
lines changed

packages/eslint-config-react-app/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ module.exports = {
5959
'default-case': ['warn', { commentPattern: '^no default$' }],
6060
'dot-location': ['warn', 'property'],
6161
eqeqeq: ['warn', 'allow-null'],
62-
'guard-for-in': 'warn',
6362
'new-parens': 'warn',
6463
'no-array-constructor': 'warn',
6564
'no-caller': 'warn',

0 commit comments

Comments
 (0)