-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚧 Convert to Typescript #120
base: main
Are you sure you want to change the base?
Conversation
"lint": "npm-run-all -c lint:*", | ||
"lint:eslint": "eslint 'app/**/*.{js,ts}'", | ||
"lint:tsc": "tsc --noEmit", | ||
"server": "ts-node --transpile-only app/server.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider an explicit build step instead of using ts-node
in production.
"start": "nodemon --watch . --watch .env.development --watch .env.development.local app/server.js", | ||
"lint": "eslint 'app/**/*.js'", | ||
"server": "node app/server.js", | ||
"start": "ts-node-dev --transpile-only --watch .,.env.development,.env.development.local app/server.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nodemon
is a popular option.. is ts-node-dev
well supported?
"dotenv": "^10.0.0", | ||
"@types/express": "^4.17.12", | ||
"@types/jest": "^26.0.23", | ||
"@types/lodash": "^4.14.170", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really still need lodash? Especially since this project is now Node 16+ and typescript.
"skipLibCheck": true, | ||
"strict": true, | ||
"target": "es2020" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicitly list excludes
here (node_modules
by default).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicit includes
as well.
@@ -0,0 +1,13 @@ | |||
{ | |||
"compilerOptions": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure node and jest are included in types
.
"prettier": "^2.2.1", | ||
"shelljs": "^0.8.2", | ||
"supertest": "^6.1.3" | ||
"supertest": "^6.1.3", | ||
"ts-jest": "^27.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to have an example in the project of mocking a module in jest, and using the ts-jest utils.
WIP