Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade react/jsx-no-comment-textnodes lint to an error
Summary: Upgrades the severity of the [`react/jsx-no-comment-textnodes`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md) lint rule from warning to error. The higher severity is warranted because, in React Native code in particular, rendering an unintended text node is likely to throw an error at runtime (unless it happens to be wrapped in `<Text />`). Furthermore, this lint is highly actionable because there's always a workaround that is less ambiguous: 1. If intending to write a comment (likely), wrap it in curly braces: `<>{ /* this is a comment */ }</>` 2. If intending to write an actual text node beginning with `//` or `/*` (unlikely), wrap it in curly braces and quotes: `<>{'/* this is a text node */'}</>` Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D25615642 fbshipit-source-id: d5a59989b04c244111071893efc546083641ac54
- Loading branch information