From b5601b7825640be4cfadc74293ffab232e50fbb5 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Fri, 24 Jan 2020 10:42:48 +0100 Subject: [PATCH 1/6] chore(docs): make tsc runnable without polluting workspace --- docs/tsconfig.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/tsconfig.json b/docs/tsconfig.json index e3e782a77baafe..dd19ef8ceef487 100644 --- a/docs/tsconfig.json +++ b/docs/tsconfig.json @@ -3,6 +3,8 @@ "include": ["types", "src/pages/**/*"], "compilerOptions": { "allowJs": false, + /* files are emmitted by babel */ + "noEmit": true, "noUnusedLocals": true } } From e4b52e2a424cc6e447d9ca0d9c37e128983051a1 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Fri, 24 Jan 2020 10:43:05 +0100 Subject: [PATCH 2/6] fix: conflicting global types due to react-native and react types existing --- .yarnclean | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .yarnclean diff --git a/.yarnclean b/.yarnclean new file mode 100644 index 00000000000000..9504fccce41221 --- /dev/null +++ b/.yarnclean @@ -0,0 +1,2 @@ +# from styled-components +@types/react-native From aee9136f468b66a0eac44f1b785ddace940283fe Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Fri, 24 Jan 2020 10:45:13 +0100 Subject: [PATCH 3/6] fix: lib errors in react-router-dom --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 97089e44a57250..8c7f960723514c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2232,9 +2232,9 @@ "@types/react-router" "*" "@types/react-router@*": - version "4.4.5" - resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-4.4.5.tgz#1166997dc7eef2917b5ebce890ebecb32ee5c1b3" - integrity sha512-12+VOu1+xiC8RPc9yrgHCyLI79VswjtuqeS2gPrMcywH6tkc8rGIUhs4LaL3AJPqo5d+RPnfRpNKiJ7MK2Qhcg== + version "5.1.4" + resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.4.tgz#7d70bd905543cb6bcbdcc6bd98902332054f31a6" + integrity sha512-PZtnBuyfL07sqCJvGg3z+0+kt6fobc/xmle08jBiezLS8FrmGeiGkJnuxL/8Zgy9L83ypUhniV5atZn/L8n9MQ== dependencies: "@types/history" "*" "@types/react" "*" From 83165cabae78afb925e2a79eb2f34e58514c50ba Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Fri, 24 Jan 2020 10:52:23 +0100 Subject: [PATCH 4/6] fix: conflicting types between dom, node, react, react-native --- .yarnclean | 2 -- docs/tsconfig.json | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 .yarnclean diff --git a/.yarnclean b/.yarnclean deleted file mode 100644 index 9504fccce41221..00000000000000 --- a/.yarnclean +++ /dev/null @@ -1,2 +0,0 @@ -# from styled-components -@types/react-native diff --git a/docs/tsconfig.json b/docs/tsconfig.json index dd19ef8ceef487..5ed0ec3d68d3f8 100644 --- a/docs/tsconfig.json +++ b/docs/tsconfig.json @@ -5,6 +5,7 @@ "allowJs": false, /* files are emmitted by babel */ "noEmit": true, - "noUnusedLocals": true + "noUnusedLocals": true, + "types": ["react"] } } From 199aabf3e830f47c12f74a2c8d9c80936333e71e Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Fri, 24 Jan 2020 10:54:23 +0100 Subject: [PATCH 5/6] test: include libs in docs --- docs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/package.json b/docs/package.json index 429accf7ad600e..b065c43b598aa0 100644 --- a/docs/package.json +++ b/docs/package.json @@ -12,7 +12,7 @@ "export": "rimraf docs/export && next export --threads=3 --concurrency=5 -o export && yarn build-sw && cpy \"cdn/*\" export", "icons": "rimraf static/icons/* && node ./scripts/buildIcons.js", "start": "next start", - "typescript": "tslint -p tsconfig.json \"src/pages/**/*.{ts,tsx}\"", + "typescript": "tsc -p tsconfig.json", "typescript:transpile": "node scripts/formattedTSDemos", "typescript:transpile:dev": "node scripts/formattedTSDemos --watch" }, From 4ddcd6da58e0e786f42fab66fbbb8aac20ac053b Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Fri, 24 Jan 2020 13:01:43 +0100 Subject: [PATCH 6/6] ignore tsconfig --- scripts/jsonlint.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/jsonlint.js b/scripts/jsonlint.js index 43f356bab22da7..d7e0000cbc9d28 100644 --- a/scripts/jsonlint.js +++ b/scripts/jsonlint.js @@ -17,7 +17,7 @@ async function run() { const filenames = glob.sync('**/*.json', { cwd: workspaceRoot, - ignore: eslintignore, + ignore: [...eslintignore, 'tsconfig*.json'], }); let passed = true;