You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feross
changed the title
Disallow accidental comments from being inserted as text nodes (react/jsx-no-comment-textnodes)
Disallow accidental comments in JSX from being inserted as text nodes (react/jsx-no-comment-textnodes)
Aug 15, 2019
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md
This rule prevents comment strings (e.g. beginning with
//
or/*
) from being accidentallyinjected as a text node in JSX statements.
Rule Details
The following patterns are considered warnings:
The following patterns are not considered warnings:
Legitimate uses
It's possible you may want to legitimately output comment start characters (
//
or/*
)in a JSX text node. In which case, you can do the following:
The text was updated successfully, but these errors were encountered: