Lab 7 Blog

    In Lab 7 we went back to our Release 0.1 link checker project and worked on creating a CONTRIBUTION.md file, source code formatter, linter, and an integration method for the said code formatter and linter. 

    The contribution file is added for the purpose of guiding Github users that visit our repositories the way to set up the project locally and help them get a headstart with their pull requests, in that file we will also be discussing how to develop & use the program as well as formatting and error checks.

    Since my project was made using Javascript, I chose Prettier and ESLint for my formatting and linter. Prettier was installed using the step by step instructions on their official website through CLI, initially there was a problem with the .prettierrc.json file for it was generating errors when trying to run the prettier command. This problem was fixed by manually creating the file instead of using their echo command. Prior to installing Prettier, my code's format was spread out and too spacious, but after the code's format became more organized and concentrated, making it easier to read through the entire file.

    ESLint was installed using their website after Prettier, it was able to find 15 errors that had to do with formatting and code quality, most of the errors came from unused parameters, regex expression, and repeated variable creation. I fixed some of the errors but chose to leave the regex expressions unchecked because it risks breaking the code.

    
To integrate both features into a local editor like VSCode, you simply install the extension from VSCode's tab after installing both features.
This week made me realize how useful these tools can be when it comes to open source development, it will keep everyone's code clean and formatted the same way, preventing any messy codes to surface on the repositories.
        




        

Comments

Popular posts from this blog

Lab 2 Blog

Lab 4 Blog

Release 0.4