Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

why are the ESTree types distinct from ESTree? #413

Closed
Labels
has prthere is a PR raised to close thispackage: typescript-estreeIssues related to @typescript-eslint/typescript-estreequestionQuestions! (i.e. not a bug / enhancment / documentation)
@43081j

Description

@43081j

For some reason, when you refactored to typescript everywhere, the choice was made to write an entire set of unconventional AST types rather than extending ESTree/ESLint types.

Out of interest, why was this?

This leads to all sorts of weirdness when mixing ESLint types in. You get away with it here because you literally rewrote all of ESLint's types and use those instead (from apseudo-module?).

I do see the comments at the top of that file, too. But avoiding compromising type compatibility with ESLint entirely seems like it should have outweighed your need for "better control".

  • It means we can'tcontext.report a "TSESTree" node if we're strictly implementing ESLint's types as we should (rather than your cloned types)
  • It means a typescript-eslintRuleModule isn't an ESLintRuleModule
  • Your node types use an enum but really should use constant string types for consistency with ESTree (example vsyours. this is pretty unconventional/inconsistent, especially sincesome of your types even use string constants rather than the enum)
  • We can't really make plugins which use typescript-eslint nodes because your types are internal? (your cloned types, i.e. RuleModule and friends)

Surely you would have been better off extending the ESTree types and being compatible with ESLint, being that you're implementing an ESLint plugin after all.

is there some reason you went down this path?

We are struggling to move our plugins over to typescript-eslint from the obsolete tslint project because of this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    has prthere is a PR raised to close thispackage: typescript-estreeIssues related to @typescript-eslint/typescript-estreequestionQuestions! (i.e. not a bug / enhancment / documentation)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp