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

Skip to content

Bug: The token type of if in the 262 IdentifierName production should be Identifier instead of Keyword #11037

Open
@JLHwung

Description

@JLHwung

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

typescript-estree

Playground Link

https://typescript-eslint.io/play#ts=5.6.2&showAST=es&fileType=.tsx&code=IYOglgZkA&eslintrc=N4KABGBEBOCuA2BTAzpAXGYBfEWg&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=true

Repro Code

a.if

ESLint Config

tsconfig

Expected Result

.ast.tokens[2].type should be Identifier (espree)

Actual Result

.ast.tokens[2].type is Keyword

Additional Info

No response

Versions

package version
@typescript-eslint/typescript-estree 8.29.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    ASTPRs and Issues about the AST structureaccepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estree

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions