Closed
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I have searched for related issues and found none that match my proposal.
- I have searched the current rule list and found no rules that match my proposal.
- I have read the FAQ and my problem is not listed.
My proposal is suitable for this project
- I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
Link to the rule's documentation
https://typescript-eslint.io/rules/consistent-type-exports/
Description
Currently, consistent-type-exports only checked named exports and re-exports. However, sometimes we might write a file that only contains types & interfaces. It would be good to enforce using export type *
instead of export *
if all the exports are types.
Fail
// Component.props.ts
export interface Props {}
// Component.ts
export function Component(props: Props) {}
// index.ts
export * from './Component.props'
export * from './Component'
Pass
// Component.props.ts
export interface Props {}
// Component.ts
export function Component(props: Props) {}
// index.ts
export type * from './Component.props' // changed
export * from './Component'
Additional Info
No response