Skip to content

refactor(estree/tokens): move logic for excluding legacy identifiers into visitor#19720

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/02-22-refactor_estree_tokens_move_logic_for_excluding_legacy_identifiers_into_visitor
Feb 25, 2026
Merged

refactor(estree/tokens): move logic for excluding legacy identifiers into visitor#19720
graphite-app[bot] merged 1 commit intomainfrom
om/02-22-refactor_estree_tokens_move_logic_for_excluding_legacy_identifiers_into_visitor

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Feb 25, 2026

Refactor.

ESTree tokens serialization has to determine whether a keyword token let, yield, or static should be a Keyword or Identifier token in ESTree tokens. The behavior is different between Espree and TS-ESLint (Espree's behavior is bizarre, but hey!).

Move the code which makes this decision from the 2nd pass loop into the 1st pass visitor.

This is part of an effort to move all logic out of the 2nd pass loop, in order to eventually remove the 2nd pass alltogther.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Feb 25, 2026
This was referenced Feb 25, 2026
Copy link
Copy Markdown
Member Author

overlookmotel commented Feb 25, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 25, 2026

Merging this PR will not alter performance

✅ 52 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing om/02-22-refactor_estree_tokens_move_logic_for_excluding_legacy_identifiers_into_visitor (c4dbdcf) with om/02-21-perf_estree_tokens_replace_hash_map_with_vec_ (05dc0d8)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

This was referenced Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter-plugins Area - Linter JS plugins A-parser Area - Parser C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants