This project uses Create React App ESLint configuration as a base. You won't
be able to commit files with linting errors, and if you do a --force
you'll break CI.
We also use Markdownlint for Markdown files.
If you are using VS Code, you should install ESLint and Markdownlint
extensions. Not only it will show you linting errors but also you can set it to
fix some of them on save. To do so, edit your settings.json
config file and
add the following:
"eslint.autoFixOnSave": true,
"eslint.alwaysShowStatus": true,
"eslint.validate": [
"javascript",
"javascriptreact"
]
main
is our main branch for nightly builds- Try to not develop directly on
main
branch - merges to
main
should be throughpull request
practice.
poc/branch-name
for proof of conceptsfeat/branch-name
for new features like, components, services, validations, flows, etc.test/branch-name
for unit/integration testsfix/branch-name
for bugfixing codehotfix/branch-name
for bugfixing in proddocs/branch-name
for documentation
- Define a reviewer from the team.
- Close the branch after PR merge (except when it has the
WIP
prefix). Otherwise this'll keep a ton unnecessary of UAT environments. - Focus on one task at time
- Make atomic/little commits
- Push before leaving the office
- Be sure all of your tests passed
We use Conventional Commits specification. This will allow us to create automatized changelogs and semantic versioning. Because of this, you won't be able to commit messages that do not follow this specification.
feat: added hat wobble
^--^ ^---------------^
| |
| +-> Summary in past simple tense.
|
+-------> Type: chore, docs, feat, fix, refactor, style, or test.
feat
: (new feature for the user, not a new feature for build script)fix
: (bug fix for the user, not a fix to a build script)docs
: (changes to the documentation)style
: (formatting, missing semicolons, etc; no production code change)refactor
: (refactoring production code, eg. renaming a variable)test
: (adding missing tests, refactoring tests; no production code change)chore
: (updating grunt tasks etc; no production code change)
We use Jest for testing and. Tests are automatically run during the Validate stage of the CI Pipeline.
The pipeline enforces a 40% minimum coverage as an incentive to write tests. It's strongly recommended that you raised this threshold over time.
Jest can be configured via jest.config.js.