上QQ阅读APP看书,第一时间看更新
Formatting our code using tslint
Once we have created our application, we are using something called tslint, which analyzes our code by looking for potential problems. Note that support for this was automatically added when we created our application. The tslint version that runs applies a very aggressive set of rules against which we check our code. I have gone with the full set of tslint rules in my code base; however, if you want to relax the rules a bit, you just need to change the tslint.json file to something like the following:
{
"extends": [],
"defaultSeverity" : "warning",
"linterOptions": {
"exclude": [
"config/**/*.js",
"node_modules/**/*.ts",
"coverage/lcov-report/*.js"
]
}
}