# HG changeset patch # User Andrew Azores # Date 1508766900 14400 # Node ID 828e021d52fd5dd0e7a6c8dc7ac0f528e4b602a4 # Parent f13e9da113507ca30eff400c0d3d20ff2625bb8f Explicitly include source files in tsconfig tsc only knows about files that are directly imported from main.ts root, and does not discover files that are buildtime dynamically discovered by Webpack using require.context(). Including the source files explicitly ensures that they are known by tsc. This is required for some external tooling, namely tslint. Also, do not exclude .spec.ts files from linting. Reviewed-by: jkang Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-October/025465.html diff -r f13e9da11350 -r 828e021d52fd package.json --- a/package.json Fri Oct 20 16:16:16 2017 -0400 +++ b/package.json Mon Oct 23 09:55:00 2017 -0400 @@ -99,8 +99,8 @@ "prelint": "mkdirp checkstyle", "lint-js": "eslint --ext '!.spec.js' -c .eslintrc.yaml src || npm run lint-js-checkstyle", "lint-js-checkstyle": "eslint -c .eslintrc.yaml -f checkstyle -o checkstyle/checkstyle-src.xml src", - "lint-ts": "tslint --exclude 'src/app/**/*.spec.ts' --project ./tsconfig.json --type-check 'src/app/**/*.ts' || npm run lint-ts-checkstyle", - "lint-ts-checkstyle": "tslint --force --exclude 'src/app/**/*.spec.ts' --project ./tsconfig.json --type-check 'src/app/**/*.ts' -o checkstyle/checkstyle-ts-src.xml -t checkstyle 'src/app/**/*.ts'", + "lint-ts": "tslint --project ./tsconfig.json --type-check 'src/app/**/*.ts' || npm run lint-ts-checkstyle", + "lint-ts-checkstyle": "tslint --force --project ./tsconfig.json --type-check 'src/app/**/*.ts' -o checkstyle/checkstyle-ts-src.xml -t checkstyle 'src/app/**/*.ts'", "lint-html": "htmlhint -c .htmlhintrc 'src/**/*.html' || npm run lint-html-checkstyle", "lint-html-checkstyle": "htmlhint -c .htmlhintrc -f checkstyle 'src/**/*.html' > checkstyle/checkstyle-html.xml", "lint-tests": "eslint -c .eslintrc.test.yaml src --ext .spec.js || npm run lint-test-checkstyle", diff -r f13e9da11350 -r 828e021d52fd tsconfig.json --- a/tsconfig.json Fri Oct 20 16:16:16 2017 -0400 +++ b/tsconfig.json Mon Oct 23 09:55:00 2017 -0400 @@ -21,6 +21,13 @@ "dom" ] }, + "include": [ + "src/**/*.ts", + "src/**/*.d.ts", + "src/**/*.spec.ts", + "src/**/*.spec.js", + "src/**/*.js" + ], "exclude": [ "node_modules" ]