- Install babel (https://babeljs.io/setup#installation)
- Add typescript (https://blogs.msdn.microsoft.com/typescript/2018/08/27/typescript-and-babel-7/)
- Change all files from
.js
extension to.ts
. - Set up the development process to be
babel-node --extensions '.ts,.tsx’ index.ts
- Install
tslint
. (https://palantir.github.io/tslint/usage/cli/). Here you have atslint.json
file example:
{
"extends": "tslint:recommended",
"rules": {
"max-line-length": {
"options": [120]
},
"new-parens": true,
"no-arg": true,
"no-bitwise": true,
"no-conditional-assignment": true,
"no-consecutive-blank-lines": false,
"no-console": {
"severity": "warning",
"options": ["debug", "info", "log", "time", "timeEnd", "trace"]
}
},
"jsRules": {
"max-line-length": {
"options": [120]
}
}
}