Skip to content

complete the jsdoc in FormatEntity.ts#1210

Open
garvthakre wants to merge 2 commits intometabrainz:masterfrom
garvthakre:add-jsdoc-to-formatentity
Open

complete the jsdoc in FormatEntity.ts#1210
garvthakre wants to merge 2 commits intometabrainz:masterfrom
garvthakre:add-jsdoc-to-formatentity

Conversation

@garvthakre
Copy link
Contributor

Problem

The formatSearchResponse function in src/api/helpers/formatEntityData.ts was missing a JSDoc block, while other exported functions in the same file already include detailed documentation.

Solution

Added a complete JSDoc comment for the formatSearchResponse function, following the existing documentation format used in the file. The new JSDoc explains parameters, return value, and provides an example usage to improve readability and maintain consistency.

Areas of Impact

Only documentation has been updated:

  • src/api/helpers/formatEntityData.ts

@garvthakre
Copy link
Contributor Author

hey @MonkeyDo i just add this JSDoc can u do a quick review and give me any suggestions ,whenever you have a moment .
also, I noticed there’s still a trailing space left in utils.js. If you want, I can clean that up so it doesn’t cause lint issues for other contributors

Copy link
Member

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

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

Hello @garvthakre, sorry for the delays!

The doc look fine, I would just ask that you separate the return type of the function to resolve a linting issue (and for legibility) as the line is now very long.

And if you could resolve the trailing space issue as well that would be great, thanks !

@garvthakre
Copy link
Contributor Author

hey @MonkeyDo ,first of all Belated Happy new year!
U asked me to do 2 things:
1 .split the @returns line so each line is shorter(is this what you meant ?)
2. To remove the trailing space ( got this one)
Just wanted to confirm it ..

@garvthakre
Copy link
Contributor Author

Hey @MonkeyDo Just following up on this so I can move ahead with the next changes. Whenever you get time to take a look, please let me know .

@MonkeyDo
Copy link
Member

Hi @garvthakre Sorry again for my delays, I totally missed your message...

1 .split the @returns line so each line is shorter(is this what you meant ?)

You did well to confirm, I got confused with the output of the failing check here: https://github.com/metabrainz/bookbrainz-site/pull/1210/checks?check_run_id=57321434620

The line causing the linting warning is the last line (541) as the line is too long.

  541:1  warning  This line has a length of 253. Maximum allowed is 150  max-len
  1. To remove the trailing space ( got this one)

Similarly, the linting error is not from this PR, but rather from #1203 and has since been fixed, so you can ignore it.

@garvthakre
Copy link
Contributor Author

@MonkeyDo Thanks for this and i am currently converting files from js to tsx bcoz i noticed there are already some files in tsx ,so is there anything that i need to keep in mind for that or any specific folder that i should ignore .

@MonkeyDo
Copy link
Member

MonkeyDo commented Feb 9, 2026

@MonkeyDo Thanks for this and i am currently converting files from js to tsx bcoz i noticed there are already some files in tsx ,so is there anything that i need to keep in mind for that or any specific folder that i should ignore .

I'm not sure I understand the question.
Generally, moving from js/jsx to ts/tsx is beneficial, and there shouldn't be any folders to ignore (although I would say the test folder is definitely of lower priority)

@garvthakre
Copy link
Contributor Author

@MonkeyDo ,can u close this one also, if everything is correct.

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.

2 participants

Comments