Skip to content

Enhancement: Remove errorOnUnknownASTType option from ParseOptions #11246

Open
@fisker

Description

@fisker

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

Relevant Package

typescript-estree

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

I don't think either the ESLint parser or Prettier wants to deal with unknown Node types, currently only ts.SyntaxKind.JSDocFunctionType is forbidden, but JSDocAllType, JSDocUnknownType etc are not. This was discussed in #1525, but I don't think they are useful. Let's remove errorOnUnknownASTType and always throw an error? For JSDoc... type we can throw an error witha better error message rather than "Unknown AST_NODE_TYPE".

I'm planning to drop support for JSDoc... in prettier/prettier#17511

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeThis change will require a new major version to be releasedenhancementNew feature or requestpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estreetriageWaiting for team members to take a look

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions