Skip to content

Bug: Visitor keys for ExportSpecifier are not in source code order #11293

Closed
@overlookmotel

Description

@overlookmotel

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Relevant Package

visitor-keys

Playground Link

No response

Repro Code

export { local as exported }

ESLint Config

tsconfig

Expected Result

Visitation order for ExportSpecifier is incorrect - exported is visited before local.

@typescript-eslint/visitor-keys inherits this problem from eslint-visitor-keys (as discussed in #11279). It has been fixed in eslint/js#655, which is included in eslint-visitor-keys v4.2.1, which was released today.

As far as I can see, this is the only substantive change made in v4.2.1, so I think it should be possible to bump eslint-visitor-keys dependency without upgrading to latest eslint, and it shouldn't affect anything else.

Actual Result

n/a

Additional Info

No response

Versions

package version
@typescript-eslint/visitor-keys 8.34.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingdependenciesIssue about dependencies of the packagelocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions