Rules
no-namespace
Disallow JSX namespace syntax, as React does not support them.
Full Name in eslint-plugin-react-jsx
react-jsx/no-namespaceFull Name in @eslint-react/eslint-plugin
@eslint-react/jsx-no-namespacePresets
recommended
recommended-typescript
recommended-type-checked
strict
strict-typescript
strict-type-checked
Rule Details
React does not support XML namespaced tags (e.g. <ns:Component />). Although the JSX specification permits namespaces, React does not implement them. Using a namespaced element will cause a runtime error.
Invalid
// ❌ Namespace tag — not supported by React.
<ns:testcomponent />;// ❌ PascalCase namespace is also not allowed.
<Ns:TestComponent />;// ❌ SVG-style namespace is also not allowed.
<svg:circle cx="50" cy="50" r="40" />;Valid
// ✅ Plain element — no namespace.
<testcomponent />;// ✅ Member expression — not a namespace.
<object.TestComponent />;// ✅ PascalCase component.
<TestComponent />;