Add scope tracker#29
Open
NullVoxPopuli-ai-agent wants to merge 1 commit into
Open
Conversation
- `ember-estree/scope`: standalone scope analysis (JS + Glimmer) with lightweight built-in classes. For codemods, tools, zmod-ember. - `ember-estree/eslint-scope`: augments an eslint-scope ScopeManager with Glimmer bindings. One function, one argument: `registerGlimmerScopes(scopeManager)`. Both share internal Glimmer walking logic (scope-shared.js) that handles path expressions, component references, and block params. Each entry point merges oxc-parser's visitor keys with glimmer's so the shared walk always has complete coverage — no Object.keys fallbacks needed. Simplifies the eslint-parser example to use `registerGlimmerScopes` from the new entry point, removing ~80 lines of hand-rolled scope helpers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
a346824 to
10f9652
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ember-estree/scope— standaloneanalyze(ast)returning a lightweightScopeManagerwith full JS + Glimmer scope info. For codemods, tools, zmod-ember.ember-estree/eslint-scope—registerGlimmerScopes(scopeManager)that augments an existing eslint-scope ScopeManager with Glimmer bindings. One function, one argument.scope-shared.js) for path expressions, component references, and block paramsoxc-parser+glimmerVisitorKeys, so the shared walk always has complete coverage — noObject.keysfallbacksregisterGlimmerScopes(scopeManager)eslint-scopeis an optional peer dependency (only needed for theeslint-scopeentry point)Rebased on
mainfollowing the v0.5.x/v0.6.x releases (visitor-keys outer walk, in-place splicing,setParenthelper, tokens split intotokens.js).Test plan
🤖 Generated with Claude Code