Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Proposal for new rule - consistent style for type-only exports #3597

Closed
@leepowelldev

Description

@leepowelldev

Basically this is the export version of this proposal which has now been implemented:
#2200

Proposal

{
  "rules": {
    "@typescript-eslint/prefer-export-type": ["error"]
  }
}
// your repro code case
type Foo = string;
type Bar = number;

function Component() {
  // ...
}

export {.Component }
// No error
export type {.Foo }
// Error
export { Bar }

This is useful for having alongside import/exports-last rule: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/exports-last.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions