react/no-unescaped-entities Pedantic
What it does
This rule prevents characters that you may have meant as JSX escape characters from being accidentally injected as a text node in JSX statements.
Why is this bad?
JSX escape characters are used to inject characters into JSX statements that would otherwise be interpreted as code.
Example
Incorrect
jsx
<div>></div>;Correct
jsx
<div>></div>;jsx
<div>{">"}</div>;How to use
To enable this rule in the CLI or using the config file, you can use:
bash
oxlint --deny react/no-unescaped-entities --react-pluginjson
{
"plugins": ["react"],
"rules": {
"react/no-unescaped-entities": "error"
}
}