Skip to content

Lint unsupported features when using #core/dom/jsx #36679

@alanorozco

Description

@alanorozco

Some features are omitted from our JSX DOM implementation. We should lint their users so that they don't accidentally use these:

🚫 Attribute names are not re-mapped.

  • Use standard HTML attribute names on elements (class, not className).
  • Dashes are ok, like data-foo="bar".

🚫 No objects in attribute values, like style={{width: 40}}

  • For style, use strings instead.
  • For class, call objstr() or use strings instead.

🚫 No Fragments

  • Instead use a root node, or split into an array of nodes.

🚫 No dangerouslySetInnerHTML

  • You should not do this anyway.

🚫 No SVG <foreignObject>

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions