docs(linter/plugin): correct doc comment on getNodeLoc function#17178
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
There was a problem hiding this comment.
Pull request overview
This PR updates documentation comments in the getNodeLoc function to accurately reflect the current implementation where the loc getter exists on the prototype rather than on individual AST node objects.
Key changes:
- Updated JSDoc comment to clarify that the function "defines" a property rather than "overwrites" a getter
- Expanded inline comments to explain why the property is non-enumerable and non-configurable
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d397ae3 to
4b2ad03
Compare
Merge activity
|
…7178) Fix these comments. They were out of date - there's no longer a `loc` getter on AST node objects - the getter is on the prototype. Also alter this function to take a `NodeOrToken`, not `Node` - it's also used for tokens.
4b2ad03 to
1714719
Compare

Fix these comments. They were out of date - there's no longer a
locgetter on AST node objects - the getter is on the prototype.Also alter this function to take a
NodeOrToken, notNode- it's also used for tokens.