Skip to content

refactor(linter/plugins, parser/napi): add JSDoc comments to generated code#17175

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/12-20-refactor_linter_plugins_parser_napi_add_jsdoc_comments_to_generated_code
Dec 20, 2025
Merged

refactor(linter/plugins, parser/napi): add JSDoc comments to generated code#17175
graphite-app[bot] merged 1 commit intomainfrom
om/12-20-refactor_linter_plugins_parser_napi_add_jsdoc_comments_to_generated_code

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Dec 20, 2025

Just add JSDoc comments to some generated code.

Copy link
Member Author

overlookmotel commented Dec 20, 2025


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.

@overlookmotel
Copy link
Member Author

This stack is all just preparatory work for more substantive changes to come.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and LEAF_NODE_TYPES_COUNT (plus FUNCTION_NODE_TYPE_IDS in 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.

@overlookmotel overlookmotel force-pushed the om/12-19-refactor_linter_plugins_parser_napi_generate_type_ids_maps_as_variants branch from 382828e to 9839836 Compare December 20, 2025 13:16
@overlookmotel overlookmotel force-pushed the om/12-20-refactor_linter_plugins_parser_napi_add_jsdoc_comments_to_generated_code branch from aaecedf to 91eb2d2 Compare December 20, 2025 13:16
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Dec 20, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 20, 2025

Merge activity

…d code (#17175)

Just add JSDoc comments to some generated code.
@graphite-app graphite-app bot force-pushed the om/12-19-refactor_linter_plugins_parser_napi_generate_type_ids_maps_as_variants branch from 9839836 to 24a8d9e Compare December 20, 2025 14:01
@graphite-app graphite-app bot force-pushed the om/12-20-refactor_linter_plugins_parser_napi_add_jsdoc_comments_to_generated_code branch from 91eb2d2 to 1956664 Compare December 20, 2025 14:02
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 20, 2025
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
@graphite-app graphite-app bot merged commit 1956664 into main Dec 20, 2025
19 checks passed
@graphite-app graphite-app bot deleted the om/12-20-refactor_linter_plugins_parser_napi_add_jsdoc_comments_to_generated_code branch December 20, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast-tools Area - AST tools A-cli Area - CLI A-linter Area - Linter 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