Skip to content

Commit d3a9e4c

Browse files
authored
Convert user service to typescript (#45)
* Rename js files to ts Update .gitignore to ensure dist folder is not commited * Add user service typing * Ensure typing for user service * Abstract status handling following Khoon Sun * Introduce guard clauses to improve readability * Handle edge cases pointed out by Typescript, such as potentially null environment variables * Remove MongoDB Memory Server and tests Let's remove the tests since they are not working at the moment * Add user service eslint * Add user service prettier * Fix lint * Update packages * Add user service GHA * Remove user-orm.ts * Fix user service README images * Fix user service README images * Fix tsconfig
1 parent f906bf1 commit d3a9e4c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3179
-1010
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
service: [frontend, services/question]
26+
service: [frontend, services/question, services/user]
2727
steps:
2828
- uses: actions/checkout@v4
2929
- name: Use Node.js

services/user/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
/dist
14+
15+
# misc
16+
.DS_Store
17+
.env.local
18+
.env.development.local
19+
.env.test.local
20+
.env.production.local
21+
22+
npm-debug.log*
23+
yarn-debug.log*
24+
yarn-error.log*

services/user/.prettierignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Compiled output
2+
/dist
3+
/tmp
4+
/out-tsc
5+
/bazel-out
6+
7+
# Node
8+
/node_modules
9+
npm-debug.log
10+
yarn-error.log
11+
12+
# IDEs and editors
13+
.idea/
14+
.project
15+
.classpath
16+
.c9/
17+
*.launch
18+
.settings/
19+
*.sublime-workspace
20+
21+
# Visual Studio Code
22+
.vscode/*
23+
.history/*
24+
25+
# Miscellaneous
26+
/.angular/cache
27+
.sass-cache/
28+
/connect.lock
29+
/coverage
30+
/libpeerconnection.log
31+
testem.log
32+
/typings
33+
34+
# System files
35+
.DS_Store
36+
Thumbs.db
37+
38+
package.json
39+
package-lock.json

services/user/.prettierrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"tabWidth": 4,
3+
"useTabs": false,
4+
"singleQuote": true,
5+
"semi": true,
6+
"bracketSpacing": true,
7+
"arrowParens": "avoid",
8+
"trailingComma": "all",
9+
"bracketSameLine": true,
10+
"printWidth": 120
11+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)