Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug: [consistent-type-export] consider same-named term/types #10313

Open
Labels
accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin
@jasonkuhrt

Description

@jasonkuhrt

Before You File a Proposal Please Confirm You Have Done The Following...

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

I am working on making anenum-like data type in thegraphql package tree shakable.

In doing that work we had to silence a few instances ofconsistent-type-export because it detected supposedly type-only exports when in fact it was not.

The code that seems to be tripping them up is:

importtype*asKind_from'./kinds_.js';export*asKindfrom'./kinds_.js';exporttypeKind=(typeofKind_)[keyoftypeofKind_];

Cases we silenced ESLint:

The specific ESLint errors that are being silenced are:

/Users/jasonkuhrt/projects/jasonkuhrt/graphql-js/src/index.ts  209:1  error  All exports in the declaration are only used as types. Use `export type`  @typescript-eslint/consistent-type-exports/Users/jasonkuhrt/projects/jasonkuhrt/graphql-js/src/language/index.ts  8:1  error  All exports in the declaration are only used as types. Use `export type`  @typescript-eslint/consistent-type-exports

Fail

N/A

Pass

N/A

Additional Info

Sorry for not filling out the template completely. I am notsure how this pattern should be supported by ESLint, what considerations there might be etc., so hoping to get some thoughts from others regarding this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp