diff --git a/.eslintrc.json b/.eslintrc.json index 7eb95650fb..0262af06a9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -416,7 +416,7 @@ "files": ["**/*.ts"], "parser": "@typescript-eslint/parser", "parserOptions": { - "project": "static/js/tsconfig.json" + "project": "tsconfig.json" }, "plugins": ["@typescript-eslint"], "rules": { diff --git a/tools/lint b/tools/lint index 792479d0ac..9a5f1e6280 100755 --- a/tools/lint +++ b/tools/lint @@ -85,7 +85,7 @@ def run(): linter_config.external_linter('mypy', command, ['py'], pass_targets=False, description="Static type checker for Python (config: mypy.ini)") 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'], pass_targets=False, description="Shares duplicate packages in yarn.lock") diff --git a/tools/run-tsc b/tools/run-tsc index d6bb801345..8d0f6d5bcb 100755 --- a/tools/run-tsc +++ b/tools/run-tsc @@ -1,3 +1,3 @@ #!/bin/sh 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" "$@" diff --git a/static/js/tsconfig.json b/tsconfig.json similarity index 89% rename from static/js/tsconfig.json rename to tsconfig.json index 8be0995305..51de28b6e2 100644 --- a/static/js/tsconfig.json +++ b/tsconfig.json @@ -2,9 +2,9 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "*": ["types/*"], + "*": ["static/js/types/*"], }, - "typeRoots": ["types"], + "typeRoots": ["static/js/types"], /* Typescript 3.4 added the --incremental flag but its API is not * currently public so ts-loader cannot use it yet. @@ -33,6 +33,6 @@ "noFallthroughCasesInSwitch": true, }, "exclude": [ - "types", + "static/js/types", ], }