[SIEM] Enable eslint react/no-children-prop (#53985)

This commit is contained in:
patrykkopycinski 2020-01-07 17:46:56 +01:00 committed by GitHub
parent 91173525c3
commit 6e1328b9f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 12 deletions

View file

@ -723,15 +723,13 @@ module.exports = {
'no-unreachable': 'error',
'no-unsafe-finally': 'error',
'no-useless-call': 'error',
// This will be turned on after bug fixes are mostly complete
// 'no-useless-catch': 'warn',
'no-useless-catch': 'error',
'no-useless-concat': 'error',
'no-useless-computed-key': 'error',
// This will be turned on after bug fixes are mostly complete
// 'no-useless-escape': 'warn',
'no-useless-rename': 'error',
// This will be turned on after bug fixes are mostly complete
// 'no-useless-return': 'warn',
'no-useless-return': 'error',
// This will be turned on after bug fixers are mostly complete
// 'no-void': 'warn',
'one-var-declaration-per-line': 'error',
@ -745,8 +743,7 @@ module.exports = {
'react/button-has-type': 'error',
'react/forbid-dom-props': 'error',
'react/no-access-state-in-setstate': 'error',
// This style will be turned on after most bugs are fixed
// 'react/no-children-prop': 'warn',
'react/no-children-prop': 'error',
'react/no-danger-with-children': 'error',
'react/no-deprecated': 'error',
'react/no-did-mount-set-state': 'error',

View file

@ -105,12 +105,9 @@ export const DefaultDraggable = React.memo<DefaultDraggableType>(
<Provider dataProvider={dataProvider} />
</DragEffects>
) : (
<Content
children={children}
field={field}
tooltipContent={tooltipContent}
value={value}
/>
<Content field={field} tooltipContent={tooltipContent} value={value}>
{children}
</Content>
)
}
/>