Skip to content

react/jsx-indent-props #2828

Closed
Closed
@jarretmoses

Description

@jarretmoses

I just upgraded to v 7.21.4 And it seems this rule is not properly detecting the spacing in a couple places that had worked before this version. (The @typescript-eslint/indent I also have is working fine). I attached the photo where its not correctly noticing the spacing I have as it is fine as is and I am doing very similar types of spacing in my codebase where this rul is not complaining. This kinda exposed the fact it seems like I have redundant rules and can just rely on the @typescript-eslint rule but I figured I'd put this here anyways.
Screen Shot 2020-10-14 at 4 04 32 PM

export const DKListingDetailItem = ({
  label,
  text,
  classNames = '',
  testid = '',
  children,
}: Props) => {
  const detail = typeof text === 'string'
    ? <p>{text}</p>
    // eslint-disable-next-line react/no-array-index-key
    : text.map((textDetail, i) => <p key={`textDetail${i}`}>{textDetail}</p>);

  return (
    <div
      className={`dk-listing-detail-item__section-container ${classNames}`.trim()}
      data-testid={testid}
    >
      <h4 className='dk-listing-detail-item__section-label'>{label}</h4>
      {detail}
      {children}
    </div>
  );
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions