This document describes the tools that are in place in this project to facilitate good practice during the development process
Two separate TypeScript projects, frontend/
and backend/
,
for frontend and backend respectively.
Structure within frontend/backend folder taken from [1]. Notably,
we distinguish between lib/
and src/
directories, the latter for
files that we have to process (eg, transpile) into build/
or dist/
.
Done with ESLint, using the following rule configs:
eslint:recommended
plugin:prettier/recommended
Prettier is further configured using the rules in .prettierrc.js
.
VSCode users may have to add the following to their ESLint extension
settings for linting to work in both frontend/
and backend/
:
"eslint.workingDirectories": [
"backend",
"frontend"
],
Developers are free to add more ESLint rules that bring their project in-line with norms specific to their language or framework of choice, eg. typescript or React.
Commit messages follow conventional commits. This is enforced by commitlint, when pushing to remote branch.
Commitizen has been installed as a
convenience for writing conventional commit messages, via npm run cz
.
This may be removed to minimise project dependencies.
Husky is used in tandem with:
The pre-push hook will interfere on initial push since commitlint
uses the remote branch as the lower bound in the commit range to inspect,
and there would be no remote branch. Bypass this the first time with
git push --no-verify
.
GitHub Actions is commonly used in OGP. Config at .github/workflows
have been provided for convenience, which will run the following:
ci.yml
codeql.yml
- static analysisBuilds will fail if any of these tasks fail.
.github/dependabot.yml
is in place so that npm dependencies will be
regularly updated. Mergify has been configured to automatically
merge non-major releases, configured via .github/mergify.yml
[1]: https://gist.github.com/tracker1/59f2c13044315f88bee9