You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To ensure consistency among developers and adhere to the chosen AirBNB styling guide, Git hooks utilizing Husky should be added. These hooks should be configured to update dependencies, lint/format, and test code before committing (in that order). Other tasks that help with code consistency and automation can also be considered.
Problem
Without an automation system in place for these tasks, multiple unwanted outcomes are possible:
Dependencies used by each developer can be out of date, causing a false positive where tests pass on outdated dependencies but not the updated versions
Code written by different developers can vary drastically, making it harder to read and edit
Developers may forget to run tests before committing their code, leading to breaking changes being added to the production, release versions of the extension.
Rational for Git hooks vs CI/CD
At the current size and development of this project, I believe that having a full CI/CD system would be overkill. I also think it's easier when the aforementioned problems are caught before changes are committed; it keeps commit history cleaner instead of having to commit new changes to fix issues that should've been caught before committing. This system for Git hooks may not be permanent, and it may be worth looking into a CI/CD system at a later date when there aren't larger priorities.
Next Steps
Install Husky
Add Husky task to update dependencies
Add Husky task to run ESLint auto-fix, exiting on changes that must be fixed manually
Add Husky task to run tests, exiting on failing tests
Add to README documentation specifying how to skip Git hooks when needed
Notes
If you are interested in completing a pull request for this issue, please tag @arimgibson to get approval first. This ensures that multiple people aren't working on the same PR at the same time, and helps to make sure you get credit for your work.
The text was updated successfully, but these errors were encountered:
Description
To ensure consistency among developers and adhere to the chosen AirBNB styling guide, Git hooks utilizing Husky should be added. These hooks should be configured to update dependencies, lint/format, and test code before committing (in that order). Other tasks that help with code consistency and automation can also be considered.
Problem
Without an automation system in place for these tasks, multiple unwanted outcomes are possible:
Rational for Git hooks vs CI/CD
At the current size and development of this project, I believe that having a full CI/CD system would be overkill. I also think it's easier when the aforementioned problems are caught before changes are committed; it keeps commit history cleaner instead of having to commit new changes to fix issues that should've been caught before committing. This system for Git hooks may not be permanent, and it may be worth looking into a CI/CD system at a later date when there aren't larger priorities.
Next Steps
Notes
If you are interested in completing a pull request for this issue, please tag @arimgibson to get approval first. This ensures that multiple people aren't working on the same PR at the same time, and helps to make sure you get credit for your work.
The text was updated successfully, but these errors were encountered: