Skip to content

🐛 Bug (eslint-plugin): [no-dual-exports] Don't report on type exports  #919

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Coming over from readmeio/remove-undefined-objects#128 (comment): when a file has:

  • A default export of a value, such as export default function stripEmptyObjects() { }
  • A named export of a type, such as export interface RemovalOptions { }

...should the readme/no-dual-exports rule still trigger?

The rule's description mentions it reports on the dual exports to help with CJS resolution. But is that just at runtime? Are there type-level reasons not to? I'm not aware of any.

Proposal: can the rule be made to ignore exports that are only in type-land (interface, type)?

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