Skip to content

Add {tokens: true} to parsers #8017

@fisker

Description

@fisker

Both @typescript-eslint/typescript-estree @babel/parser flow-parser supports {tokens: true}.

I think with token info we can make some improvements (maybe comments print).

Example:

/{\s*}/.test(
options.originalText.slice(
options.locStart(n),
options.locStart(n.source)
)

I think we don't have to check source code, instead we can check tokens between.

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.type:refactorIssues about tackling technical debt

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions