All rules

Sheath rule

native-unknown-attribute

NativePHP elements must use supported attributes and valid assignment syntax.
Package
NativePHP
Category
Native
Default severity
warning by default
Auto-fix
Auto-fix available

when an attribute has an unambiguous canonical spelling

#Why

Unsupported attributes are ignored by the target element. Unquoted values and whitespace around = can also prevent NativePHP from reading the intended assignment.

#Examples

#Bad

{{-- padding-top and data-testid are not consumed by column. --}}
<native:column padding-top="8" data-testid="account">
<native:text>Account</native:text>
</native:column>

#Good

{{-- Use the canonical NativePHP attribute. --}}
<native:column paddingTop="8">
<native:text>Account</native:text>
</native:column>
{{-- Or use a native class utility. --}}
<native:column class="pt-2">
<native:text>Account</native:text>
</native:column>
{{-- Quote assignments without whitespace around the equals sign. --}}
<native:image src="/images/avatar.png" />

#Attribute Catalog

Accepted names include built-in attributes and attributes exposed by registered elements. Elements that accept a dynamic attribute set are skipped instead of receiving a guessed allowlist.

#Options

All NativePHP rules accept nativeViewPaths. The default is ['views/native/']. See Native View Detection for path configuration.

#See Also

Related rules cover purpose-specific attribute behavior: