It seems like they both achieve the same result. With TSLint, I had to install a plugin in VSCode? This probably is not preferable should someone in my team use a different editor.
tsconfig.json
receives the configuration for the typescript compiler like allowing javascript files, the location of your files, etc.
tslint.json
is the configuration for TSLint, TSLint helps you to detect bad coding practices or follow a coding style, you can configure its options like disallow unused variables, no logging to the console, etc. Also, TSLint is not just a plugin for vscode, so someone in your team can use the editor of its preference and still use TSLint.
See this links:
tsconfig.json
tslint.json
TSConfig : Deals with the compiler. Throws an error on compiling bad code. So in Anguar "ng serve" will give you an error Ex Error => error TS6138: Property 'dialog' is declared but its value is never read.
TsLint : Its to ensure best practice is followed. It does not throw an error on compilation. However, it shows a red line on the code to tell you that your style of coding needs some changes. On VScode , you need to install a plugin to detect tslint. On webstorm , it is inbuilt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With