Skip to content

Enhancement: Add serialization info to parser #6541

Closed
@nzakas

Description

@nzakas

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

Relevant Package

parser

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).

Description

Up until now, the flat config in ESLint was unable to serialize custom parsers, meaning that caching and --print-config would not work with typescript-eslint/parser. I just added a feature that allows parsers to export a meta key that would provide serialization information, such as:

exports.meta = {
    name: "typescript-eslint/parser",
    version: "0.0.0"
};

This should be exported on the same object as parse() and parseForESLint().

Fail

// not applicable

Pass

// not applicable

Additional Info

It seems like there may be some fields meant for rules in this template. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issueenhancementNew feature or requestpackage: parserIssues related to @typescript-eslint/parser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions