[eslint config] [breaking] enable react/no-array-index-key, react/require-default-props

This commit is contained in:
Jordan Harband
2016-12-11 23:25:40 -08:00
parent 6c4456d354
commit e1a307ae0a

View File

@@ -296,6 +296,14 @@ module.exports = {
beforeSelfClosing: 'always',
afterOpening: 'never'
}],
// Prevent usage of Array index in keys
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
'react/no-array-index-key': 'error',
// Enforce a defaultProps definition for every prop that is not a required prop
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-default-props.md
'react/require-default-props': 'error',
},
settings: {