First things first, I knew I had to make sure that the functions in my toolkit were working as expected. So, I created a set of unit test cases for each of the functions. This ensured that I could easily test each function in the future and that they would work consistently. To ensure that the code was well-formatted and followed best practices, I also implemented a syntax checker (ESLint).
But that wasn’t enough. I wanted to make sure that the code was of the highest quality possible. So, I added a check to ensure that all the unit test cases passed and that the code coverage was sufficient before committing any code. This helped to catch any potential issues early on in the development process and ensured that the code was of high quality.
Of course, I also wanted to make sure that the codebase was consistent and easy to read. So, I implemented guidelines for committing code to the repository. Specifically, I required that all commits followed a conventional commit format, and that the code was automatically formatted using Prettier. This helped to ensure that the code was consistent and easy to read.
And then, I took things to the next level. I implemented a SonarQube plugin to check for code smells, bugs, and vulnerabilities. This was like having a second set of eyes to help me identify potential issues before they could cause any problems. It provided an extra layer of security and helped me to ensure that the code was of the highest quality.
Once the code had passed all the necessary checks and was ready to be pushed, I created a new branch and generated a pull request. This helped to ensure that the code was reviewed by other developers before being merged into the main branch.
Finally, I automated the process of generating documentation and deploying it on GitHub pages, as well as creating and publishing an npm package. This made it easy for other developers to use the toolkit and helped to increase its adoption.
If you’re interested in checking out the toolkit, you can find it on GitHub
(https://github.com/vitabletec/general-js-toolkit). The documentation is also available on GitHub pages (https://vitabletec.github.io/general-js-toolkit/), and you can download the npm package from the official npm site (https://www.npmjs.com/package/general-js-toolkit).
Like and add star my git repo if you feel it is useful.
I hope my journey inspires you to implement a comprehensive development process for your own projects. And if you have any questions or feedback, feel free to leave a comment below!