Add JSDoc to @codemod-utils/json #84
Labels
enhance: documentation
Issue asks for better documentation (e.g. README, code, tests)
hacktoberfest
Issue counts towards Hacktoberfest
help: new contributors
Issue is actionable and ready for new contributors to work on
Background
In #77, I started adding JSDoc to
@codemod-utils/files
, so that end-developers have an additional reference for how the provided utilities work. This also provided me a chance to review existing code examples and see how they can be simplified (easier to understand).I would like to see... 🙋♀️🙋♂️
Note
The package's
README.md
already has some documentation. Use the existing passages and code examples to get started.Add JSDoc to the following utilities from
@codemod-utils/json
:convertToMap()
convertToObject()
readPackageJson()
validatePackageJson()
Why and how 💬
For each utility, add a JSDoc code block in the following format:
So the order of appearance is:
void
)How to test JSDoc
After adding the code block, find a place where the function is used. Possible places are:
When you hover over the function's name, you will see if the JSDoc shows up correctly (with regards to, for example, syntax highlight, code indentation).
How to fix formatting issues
Change the directory to the package's root, then run the
lint:fix
script.cd packages/json pnpm lint:fix
How to create a pull request
This repo uses
changesets
to keep track of how package versions should be updated. Before you open a pull request, please add a changeset (indicate a minor version release) as your very last commit. (More information can be found inCONTRIBUTING.md
.)In your pull request, please provide a brief description, which explains the problem that you want to solve and how you solved it. As the problem concerns documentation, I may push an additional commit to your branch to edit passages, or ask for clarification and make suggestions.
References
@codemod-utils/json
@codemod-utils/files
The text was updated successfully, but these errors were encountered: