Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add iteratePropertyReferences(expressionNode, traceMap) to ReferenceTracker. #247

Closed
ota-meshi opened this issue Mar 10, 2025 · 1 comment · Fixed by #248
Closed

Add iteratePropertyReferences(expressionNode, traceMap) to ReferenceTracker. #247

ota-meshi opened this issue Mar 10, 2025 · 1 comment · Fixed by #248
Labels

Comments

@ota-meshi
Copy link
Member

I would like to see ReferenceTracker add methods to track properties of expression nodes.

Perhaps the implementation would look something like this:

    /**
     * Iterate the references of properties of the expression node.
     * @param {Node} node The expression node.
     * @param {object} traceMap The trace map.
     * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
     */
    *iteratePropertyReferences(node, traceMap) {
        yield* this._iteratePropertyReferences(node, [], nextTraceMap);
    }

This is necessary to implement eslint-community/eslint-plugin-n#419 (Pass import.meta to the expression node), but I think it would be useful for other purposes as well.

Copy link

🎉 This issue has been resolved in version 4.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant