Conventions - 913-RichardOrr/caliber-mobile GitHub Wiki
Naming Conventions:
Here are our naming conventions:
variables should be camelCase.
functions should be camelCase.
components should be PascalCase.
file names should be using PascalCase, however test files should be PascalCase.test.extension
Environment Variable CONSTANTS should be ALL CAPS with an underscore between words. like URI
Classes should be Capitalized.
Interfaces should be Capitalized.
Branches should be named like so: yourfirstfullnameBranchnameFeaturename e.g. jonathanBatchesTestComponent. Bugfix branches don't need your name on it. Large features don't need your name on it.
Tests should be in the test folder organized into their own folder name.
Code Conventions:
https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html For each function, be sure to add a multiline comment like so:
/**
* Some info
*
* @constructor
* @param {string} title - The title of the book
*/
Jest tests don't need comments, but it would be helpful to add in comments for the mocks.
Git Convention
-
Squash before merging to dev. You don't need to squash merges before you merge to your own group's branch.
-
If you are done with that branch, delete the branch afterwards.
-
Peer review with 2 people in your group.
-
Merge dev into main after MVP.