-
Notifications
You must be signed in to change notification settings - Fork 3
Code Formatting and Standards
Cristian Aldea edited this page Mar 13, 2020
·
3 revisions
We are using pre-commit for coding standards.
- Install here: https://pre-commit.com/#install
pre-commit install
- Once there exists a
.pre-commit-config.yaml
file, you can runpre-commit run -a
- Pre-commit is a local Git hook that runs when you do a
git commit ...
command. - Your commit will pass if all pre-commit checks have passed.
- Otherwise, pre-commit will make the changes for you so that the checks will pass, and you have to re-commit.
- Depending on the hooks we use, it can and will enforce our coding standards.
- First layer of code protection: running pre-commit locally to pass all checks
- Second layer of code protection: running pre-commit checks on Travis
- Third layer of code protection: you cannot merge any PR unless all Travis builds have passed
- When passing properties to a component, the names must match:
<Component propertyName={propertyName}/>