Mercurial > hg > thermostat-ng > web-client
changeset 258:828e021d52fd
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
author | Andrew Azores <aazores@redhat.com> |
---|---|
date | Mon, 23 Oct 2017 09:55:00 -0400 |
parents | f13e9da11350 |
children | 970066338150 |
files | package.json tsconfig.json |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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",