jsx-eslint/eslint-plugin-react
Vedi su GitHubRule proposal: disallow children on DOM element tags when contentEditable
Open
#713 aperta il 26 lug 2016
help wantednew rule
Metriche repository
- Star
- (8630 star)
- Metriche merge PR
- (Merge medio 1g 17h) (3 PR mergiate in 30 g)
Descrizione
React will issue a warning in dev if you use contentEditable with children. This can be suppressed with suppressContentEditableWarning.
This should be easy enough to enforce for most cases with a linter rule.
Bad:
<div contentEditable>
Children
</div>
Good:
<div contentEditable />
<div contentEditable suppressContentEditableWarning>
Children
</div>