Skip to content

[Bug]: react-doctor complains about non-standard component imports. #875

Description

@Kurioni

Hi!
I'm using react-doctor version 0.5.6. When declaring a styled component and using it in another file via import "import * as S from './style';", react-doctor incorrectly recognizes it as unused.

For example:

// style.ts
export const Custom = styled('div')(({ theme }) => ({...}));

// Component.tsx

import * as S from './style';

function Example() {

  return (
   ...
   <S.Custom .../>
  );
}

Maintainability: deslop/unused-export
Unused export: Custom is exported but no module
imports it, so it expands the public surface and can
mislead callers about supported API.
→ Drop the export keyword (or remove the declaration) if
no other module uses this symbol.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions