mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-06-20 03:28:46 +08:00
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?
This commit is contained in:
@@ -61,7 +61,6 @@ module.exports = {
|
||||
'default-case': ['warn', { commentPattern: '^no default$' }],
|
||||
'dot-location': ['warn', 'property'],
|
||||
eqeqeq: ['warn', 'allow-null'],
|
||||
'guard-for-in': 'warn',
|
||||
'new-parens': 'warn',
|
||||
'no-array-constructor': 'warn',
|
||||
'no-caller': 'warn',
|
||||
|
||||
Reference in New Issue
Block a user