Skip to content

Commit e1a307a

Browse files
committed
[eslint config] [breaking] enable react/no-array-index-key, react/require-default-props
1 parent 6c4456d commit e1a307a

File tree

1 file changed

+8
-0
lines changed
  • packages/eslint-config-airbnb/rules

1 file changed

+8
-0
lines changed

packages/eslint-config-airbnb/rules/react.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,14 @@ module.exports = {
296296
beforeSelfClosing: 'always',
297297
afterOpening: 'never'
298298
}],
299+
300+
// Prevent usage of Array index in keys
301+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
302+
'react/no-array-index-key': 'error',
303+
304+
// Enforce a defaultProps definition for every prop that is not a required prop
305+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-default-props.md
306+
'react/require-default-props': 'error',
299307
},
300308

301309
settings: {

0 commit comments

Comments
 (0)