TSLint
TSLint is an extensible static analysis tool that checks TypeScript code for readability, maintainability, and functionality errors. It is widely supported across modern editors & build systems and can be customized with your own lint rules, configurations, and formatters.
The tslint.json file in the root of the project, contains the set of rules, to which your IDE and typescript compiler will comply to when showing syntax errors for example, or when compiling your project and show syntax warnings.
The tslint is dependent on typescript tsc.
Package.json
The file which defines your project. Lists all its dependencies, for both dev environment and production environment, that should be installed with npm install.
it also specifies node scripts to run in the different life cycles of the project. such scripts are:
You can also define your own scripts to use with in these scripts. for example:
"build" : "node rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail",
"postinstall" : "build"
In the above example we wrote a new script called build where we first run node rimraf dist which clears the "dist" folder, then we run webpack --config config/webpack.prod.js --progress --profile --bail which runs the webpack compiler with a specified path to its config file (this process will refill the dist folder).
Then we use the new build script inside the postinstall script. this will have the effect of the project building right after the install process finishes.
devDependencies
When specifying dependencies in you package json you should do that in two properties the dependencies property and the devDependencies property.
The devDependency object is different than the dependencies object by that that it will only install using the install command, it will not install when passing the --production flag to the install command, or when installing a package using the npm install "$package" command thus providing an install environment for development.
In the devDependencies object you should define test-packages for testing, transpiles for your project, development servers, and other packages you need for development purposses only.