DEV Community

Ririio
Ririio

Posted on

Release 0.3 - Working with external repository

Thought Process

Working with other people's repository is always going to be difficult. With how each individual contributor might always change a tiny bit of the code when they are working on it. For example,
one person will use a double quotation mark as to a single. Or how some people will use an "addition assignment operator" += as to Template literals

Therefore, I thought to myself, that won't it be better to add a pretter and linter for the current repository that I am working on? And when I add a pre-commit hook, it ensures that any future pull request will follow the same format preventing any bugs and inconsistencies from occuring.

Working on the repository

Adding Prettier is a bit difficult. Trying to figure out the format of how the author wrote his code has to be put into considerion, because changing everything drastically will cause a setback for when the author and those whom had worked for it touched the code. Once I finish adding the prettier I decided to add the ESLint, unlike the former that simply changes the style, this would basically remove any inconsistencies and repetition, and tell the user about any codes that does not follow a specific standard. This is important, because it can directly impact the amount of bugs that will occur in the future. Once I have added it, I had to individually check the files that it highlights and change their values to ensure that no possible bugs can occur in the future. Once this is done, I added a pre-commit hook to ensure that any commit that the user does gets checked before passing.

When I was testing the Linter, I noticed that every anime will display a "list" of episodes, even when they only have one currently, or when tehy are a movie. I decided to change this by hiding the list whenever the amount of episodes are equal or less than to one. I also, removed the button for next and previous episode.

Difference from Release 0.2

Unlike my first time working with this repository during the hacktober fest, I focused more in ensuring the quality of the code as to the entire website itself. Having to have a prettier and linter available, ensures that any future code will follow the same format, thus leading to less errors.

Top comments (0)