Skip to content

Question about jsx-child-element-spacing logic and <br/> tags #2988

Closed
@pascalpp

Description

@pascalpp

A couple examples:

  return (
    <div className="break-tag-example">
      one line
      <br/>
      another line
    </div>
  );
  return (
    <div className="break-tag-example">
      one line<br/>
      another line
    </div>
  );

Both of these are flagged for ambiguous spacing by jsx-child-element-spacing. But it seems in both cases the intent is clear and both would render as expected in the browser. I wonder if there could be some exception made for <br/> tags?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions