refactor(linter/plugins, parser/napi): add JSDoc comments to generated code#17175
Merged
graphite-app[bot] merged 1 commit intomainfrom Dec 20, 2025
Conversation
This was referenced Dec 20, 2025
Member
Author
Member
Author
|
This stack is all just preparatory work for more substantive changes to come. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors generated code to use proper JSDoc comments instead of single-line comments for exported constants. The changes update the code generator template and show the resulting improvements in the generated JavaScript and TypeScript files.
Key changes:
- Updated the estree_visit.rs generator to output JSDoc-style comments (
/** ... */) instead of single-line comments (//) - Applied JSDoc comments to three exported constants:
NODE_TYPE_IDS_MAP,NODE_TYPES_COUNT, andLEAF_NODE_TYPES_COUNT(plusFUNCTION_NODE_TYPE_IDSin the linter variant)
Reviewed changes
Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tasks/ast_tools/src/generators/estree_visit.rs | Updated generator template to produce JSDoc comments for exported constants |
| napi/parser/src-js/generated/visit/type_ids.js | Generated JavaScript file with JSDoc comments applied |
| apps/oxlint/src-js/generated/type_ids.ts | Generated TypeScript file with JSDoc comments applied, including the linter-specific constant |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
382828e to
9839836
Compare
aaecedf to
91eb2d2
Compare
Contributor
Merge activity
|
…d code (#17175) Just add JSDoc comments to some generated code.
9839836 to
24a8d9e
Compare
91eb2d2 to
1956664
Compare
Base automatically changed from
om/12-19-refactor_linter_plugins_parser_napi_generate_type_ids_maps_as_variants
to
main
December 20, 2025 14:09
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.

Just add JSDoc comments to some generated code.