Skip to content

chore: Update jsdoc to tolerate trailing commas #8819

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

Merged
merged 1 commit into from
Jun 30, 2025

Conversation

joeyparrish
Copy link
Member

jsdoc doesn't tolerate trailing commas in record types. This is frustrating because:

  • It creates larger diffs to skip trailing commas when you add new fields
  • It requires a style in typedefs that is the opposite of the style rules in actual code

This updates our jsdoc fork (joeyparrish/jsdoc@a1e61a4) and its parser dependency "catharsis" (joeyparrish/catharsis@afcfb1c) to tolerate trailing commas when parsing record types.

Closes #1236

jsdoc doesn't tolerate trailing commas in record types.  This is
frustrating because:

 - It creates larger diffs to skip trailing commas when you add new
   fields
 - It requires a style in typedefs that is the opposite of the style
   rules in actual code

This updates our jsdoc fork
(joeyparrish/jsdoc@a1e61a4)
and its parser dependency "catharsis"
(joeyparrish/catharsis@afcfb1c)
to tolerate trailing commas when parsing typedefs.

Closes shaka-project#1236
@joeyparrish joeyparrish requested a review from avelad June 30, 2025 19:10
@avelad
Copy link
Member

avelad commented Jun 30, 2025

I’ll test and review tomorrow. Thanks @joeyparrish !

@shaka-bot
Copy link
Collaborator

Incremental code coverage: No instrumented code was changed.

@joeyparrish
Copy link
Member Author

I have a follow-up to add trailing commas to all the record types.

@avelad
Copy link
Member

avelad commented Jun 30, 2025

I have a follow-up to add trailing commas to all the record types.

In this PR?

@joeyparrish
Copy link
Member Author

No, a separate PR.

@joeyparrish joeyparrish merged commit 4623009 into shaka-project:main Jun 30, 2025
31 of 33 checks passed
@joeyparrish joeyparrish deleted the trailing-commas branch June 30, 2025 19:43
joeyparrish added a commit to joeyparrish/shaka-player that referenced this pull request Jun 30, 2025
Now that jsdoc supports this, it will make future diffs cleaner.  See shaka-project#8819
joeyparrish added a commit that referenced this pull request Jun 30, 2025
Now that jsdoc supports this, it will make future diffs cleaner. See
#8819 and #1236.
avelad pushed a commit that referenced this pull request Jul 7, 2025
jsdoc doesn't tolerate trailing commas in record types. This is
frustrating because:

- It creates larger diffs to skip trailing commas when you add new fields
- It requires a style in typedefs that is the opposite of the style rules in actual code

This updates our jsdoc fork
(joeyparrish/jsdoc@a1e61a4)
and its parser dependency "catharsis"
(joeyparrish/catharsis@afcfb1c)
to tolerate trailing commas when parsing record types.

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

Successfully merging this pull request may close these issues.

jsdoc fork should tolerate trailing commas in doc strings
3 participants