Skip to content

[consistent-type-exports] Improve docs #4769

Closed
@Josh-Cena

Description

Suggested Changes

The docs look a little... wrong to me.

This rule aims to standardize the use of type exports style across a codebase.

Given a class Button, and an interface ButtonProps, examples of code:

But the actual example is missing.

Further down, the "correct" example for fixMixedExportsWithInlineTypeSpecifier:

export { Button } from 'some-library';
export type { ButtonProps } from 'some-library';
export { Button, type ButtonProps } from 'some-library';

Is obviously duplicate export. Is that intended?

Furthermore, it may be beneficial to point out in "When Not To Use It" that isolatedModules already covers this:

Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.

Affected URL(s)

https://typescript-eslint.io/rules/consistent-type-exports

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updating

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions