react/no-namespace Suspicious
What it does
Enforce that namespaces are not used in React elements.
Why is this bad?
Namespaces in React elements, such as svg:circle, are not supported by React.
Examples
Examples of incorrect code for this rule:
jsx
<ns:TestComponent />
<Ns:TestComponent />Examples of correct code for this rule:
jsx
<TestComponent />
<testComponent />How to use
To enable this rule using the config file or in the CLI, you can use:
json
{
"plugins": ["react"],
"rules": {
"react/no-namespace": "error"
}
}bash
oxlint --deny react/no-namespace --react-plugin