tsconfig: Move to top level.

This way, webpack.config.ts is type checked.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2019-11-04 14:37:32 -08:00 committed by Tim Abbott
parent de4685441c
commit 0584a7938f
4 changed files with 6 additions and 6 deletions

View File

@ -416,7 +416,7 @@
"files": ["**/*.ts"], "files": ["**/*.ts"],
"parser": "@typescript-eslint/parser", "parser": "@typescript-eslint/parser",
"parserOptions": { "parserOptions": {
"project": "static/js/tsconfig.json" "project": "tsconfig.json"
}, },
"plugins": ["@typescript-eslint"], "plugins": ["@typescript-eslint"],
"rules": { "rules": {

View File

@ -85,7 +85,7 @@ def run():
linter_config.external_linter('mypy', command, ['py'], pass_targets=False, linter_config.external_linter('mypy', command, ['py'], pass_targets=False,
description="Static type checker for Python (config: mypy.ini)") description="Static type checker for Python (config: mypy.ini)")
linter_config.external_linter('tsc', ['tools/run-tsc'], ['ts'], pass_targets=False, linter_config.external_linter('tsc', ['tools/run-tsc'], ['ts'], pass_targets=False,
description="TypeScript compiler (config: static/js/tsconfig.json)") description="TypeScript compiler (config: tsconfig.json)")
linter_config.external_linter('yarn-deduplicate', ['tools/run-yarn-deduplicate'], ['lock'], linter_config.external_linter('yarn-deduplicate', ['tools/run-yarn-deduplicate'], ['lock'],
pass_targets=False, pass_targets=False,
description="Shares duplicate packages in yarn.lock") description="Shares duplicate packages in yarn.lock")

View File

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
ZULIP_PATH="$(dirname "$0")/.." ZULIP_PATH="$(dirname "$0")/.."
exec "$ZULIP_PATH/node_modules/.bin/tsc" --project "$ZULIP_PATH/static/js" "$@" exec "$ZULIP_PATH/node_modules/.bin/tsc" --project "$ZULIP_PATH" "$@"

View File

@ -2,9 +2,9 @@
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"*": ["types/*"], "*": ["static/js/types/*"],
}, },
"typeRoots": ["types"], "typeRoots": ["static/js/types"],
/* Typescript 3.4 added the --incremental flag but its API is not /* Typescript 3.4 added the --incremental flag but its API is not
* currently public so ts-loader cannot use it yet. * currently public so ts-loader cannot use it yet.
@ -33,6 +33,6 @@
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
}, },
"exclude": [ "exclude": [
"types", "static/js/types",
], ],
} }