You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ra...@apache.org on 2020/07/23 06:47:41 UTC

[incubator-annotator] 06/10: Use a single tsconfig.json

This is an automated email from the ASF dual-hosted git repository.

randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git

commit 58a0421e43b86f9cd44164cfaf1fdbccec525313
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Wed Jul 22 23:12:23 2020 -0700

    Use a single tsconfig.json
---
 .eslintrc.js        |  3 ---
 package.json        |  2 +-
 tsconfig.json       | 45 ++++++++++++++++++++++++++-------------------
 tsconfig.tests.json | 15 ---------------
 4 files changed, 27 insertions(+), 38 deletions(-)

diff --git a/.eslintrc.js b/.eslintrc.js
index 0ef6a11..8e628eb 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -123,9 +123,6 @@ module.exports = {
       globals: {
         assert: true,
       },
-      parserOptions: {
-        project: ['./tsconfig.tests.json'],
-      },
       rules: {
         'import/no-internal-modules': [
           'error',
diff --git a/package.json b/package.json
index e30f679..4517ae5 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,7 @@
     "prepublishOnly": "yarn run build",
     "start": "yarn run web:server",
     "test": "cross-env BABEL_ENV=test nyc mocha packages/*/test/**/*.test.[jt]s",
-    "typecheck": "tsc && tsc -p tsconfig.tests.json",
+    "typecheck": "tsc",
     "validate": "cross-env BABEL_ENV=test mocha test/**/*.test.[jt]s",
     "web:build": "webpack  --config=web/webpack.config.js --mode development",
     "web:server": "webpack-dev-server --config=web/webpack.config.js --hot --mode development"
diff --git a/tsconfig.json b/tsconfig.json
index e217eda..cdd2af5 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,23 +1,30 @@
 {
-    "compilerOptions": {
-        "baseUrl": ".",
-        "strict": true,
-        "noEmit": true,
-        "target": "ES2017",
-        "lib": [
-            "ES2020",
-            "DOM",
-            "DOM.Iterable"
-        ],
-        "moduleResolution": "Node",
-        "paths": {
-          "@annotator/*": ["packages/*/src"]
-        },
-        "typeRoots": [
-            "./@types"
-        ]
+  "compilerOptions": {
+    "allowSyntheticDefaultImports": true,
+    "baseUrl": ".",
+    "isolatedModules": true,
+    "lib": [
+      "dom",
+      "dom.iterable",
+      "es2020",
+    ],
+    "moduleResolution": "node",
+    "noEmit": true,
+    "resolveJsonModule": true,
+    "paths": {
+      "@annotator/*": ["packages/*/src"]
     },
-    "include": [
-        "packages/*/src/index.ts"
+    "strict": true,
+    "target": "es2017",
+    "typeRoots": [
+      "@types",
+      "node_modules/@types"
     ]
+  },
+  "include": [
+    "@types",
+    "packages/*/src",
+    "packages/*/test",
+    "test"
+  ]
 }
diff --git a/tsconfig.tests.json b/tsconfig.tests.json
deleted file mode 100644
index 578fb4a..0000000
--- a/tsconfig.tests.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-    "extends": "./tsconfig.json",
-    "compilerOptions": {
-        "allowSyntheticDefaultImports": true,
-        "resolveJsonModule": true,
-        "typeRoots": [
-            "./node_modules/@types",
-            "./@types"
-        ]
-    },
-    "include": [
-        "test/**/*.ts",
-        "packages/*/test/**/*.ts"
-    ]
-}