From 8d6ad59c5254413c6eb6575585cafa76fa782b3c Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Tue, 19 May 2020 05:31:05 -0700 Subject: [PATCH] add tsconfig to template Summary: When opening a freshly generated plugin in VScode the IDE would be full of errors, even though it can bundle correctly thanks to the defaults used by bundle. This is fixed by diff by correctly setting up a tsconfig. Reviewed By: jknoxville Differential Revision: D21523817 fbshipit-source-id: 8f6b58fbfb704460ddb5b845ddfb137b28d37187 --- .../pkg/templates/plugin/tsconfig.json.template | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 desktop/pkg/templates/plugin/tsconfig.json.template diff --git a/desktop/pkg/templates/plugin/tsconfig.json.template b/desktop/pkg/templates/plugin/tsconfig.json.template new file mode 100644 index 000000000..fd08049ec --- /dev/null +++ b/desktop/pkg/templates/plugin/tsconfig.json.template @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "ES2017", + "module": "ES6", + "jsx": "react", + "sourceMap": true, + "noEmit": true, + "strict": true, + "moduleResolution": "node", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["src/index.tsx"] +}