Eslint-plugin-react: Should ignore HTML slashes

Created on 24 Jun 2017  路  3Comments  路  Source: yannickcr/eslint-plugin-react

Hi guys!

I'm getting:

./src/pages/Admin/Campaigns/NewReaction.jsx
  Line 98:  Comments inside children section of tag should be placed inside braces  react/jsx-no-comment-textnodes

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

This is my line 98:

            <span className="pl-c"><span className="pl-c">&#47;&#47;</span> ...</span><br />

Those &#47; are literally wrote in that way.

See you!

Most helpful comment

The proper solution is {'//'}, as opposed to encoding entities directly.

All 3 comments

The proper solution is {'//'}, as opposed to encoding entities directly.

That works perfectly, but I still agree that &#47;&#47; should work as well.

I think that the common convention to indicate intentionality in jsx string literals is with curlies; we could also support using html encodings, but i think that鈥檚 also likely to be an error, like //.

Was this page helpful?
0 / 5 - 0 ratings