Перейти до вмісту

noJsxNamespace

Цей контент ще не доступний вашою мовою.

biome.json
{
"linter": {
"rules": {
"nursery": {
"noJsxNamespace": "error"
}
}
}
}

Disallow JSX namespace syntax.

React does not support XML namespaced tags such as <ns:Component />. Although the JSX specification permits namespaces, React does not implement them and using a namespaced element may cause a runtime error.

<ns:testcomponent />
code-block.jsx:1:2 lint/nursery/noJsxNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Unexpected JSX namespace syntax.

> 1 │ <ns:testcomponent />
^^^^^^^^^^^^^^^^
2 │

React does not support namespaced JSX tags. Use a plain element name or a member expression instead.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

<svg:circle cx="50" cy="50" r="40" />
code-block.jsx:1:2 lint/nursery/noJsxNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Unexpected JSX namespace syntax.

> 1 │ <svg:circle cx=“50” cy=“50” r=“40” />
^^^^^^^^^^
2 │

React does not support namespaced JSX tags. Use a plain element name or a member expression instead.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

<testcomponent />
<object.TestComponent />