JS.REACT.NO.NAMESPACE

Enforce that namespaces are not used in React elements

Enforces the absence of a namespace in React elements, such as with svg:circle, as they are not supported in React.

Rule Details

The following patterns are considered warnings:

Copy
<ns:TestComponent />
Copy
<Ns:TestComponent />

The following patterns are not considered warnings:

Copy
<TestComponent />
Copy
<testComponent />

When Not To Use It

If you are not using React.

The content on this page is adapted from the ESLint User Guide. Copyright © OpenJS Foundation and other contributors, www.openjsf.org. All rights reserved. https://eslint.org/docs/rules/