Skip to content

Commit

Permalink
[Build]: add type-check to npm scripts and ci
Browse files Browse the repository at this point in the history
  • Loading branch information
golopot committed May 11, 2019
1 parent fce69eb commit d344dca
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -7,8 +7,9 @@
"scripts": {
"coveralls": "cat ./reports/coverage/lcov.info | coveralls",
"lint": "eslint ./",
"pretest": "npm run lint",
"pretest": "npm run lint && npm run type-check",
"test": "npm run unit-test",
"type-check": "tsc",
"unit-test": "istanbul cover --dir reports/coverage node_modules/mocha/bin/_mocha tests/lib/**/*.js tests/util/**/*.js tests/index.js"
},
"files": [
Expand Down
21 changes: 21 additions & 0 deletions tsconfig.json
@@ -0,0 +1,21 @@
{
"compilerOptions": {
"target": "ES2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": ["es2016"], /* Specify library files to be included in the compilation. */
"allowJs": true, /* Allow javascript files to be compiled. */
"checkJs": true, /* Report errors in .js files. */
"noEmit": true, /* Do not emit outputs. */

/* Strict Type-Checking Options */
// "strict": true, /* Enable all strict type-checking options. */
// "noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
},
"include": ["lib"],
}

0 comments on commit d344dca

Please sign in to comment.