From 457c7830f68854f22414a2505792774d4a8ac29c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Mon, 21 Jan 2019 17:35:10 +0000 Subject: [PATCH] Clean up react-scripts-ts files --- images.d.ts | 3 --- package.json | 8 +++++++- src/react-app-env.d.ts | 1 + tsconfig.json | 40 +++++++++++++++++----------------------- tsconfig.prod.json | 3 --- tsconfig.test.json | 6 ------ 6 files changed, 25 insertions(+), 36 deletions(-) delete mode 100644 images.d.ts create mode 100644 src/react-app-env.d.ts delete mode 100644 tsconfig.prod.json delete mode 100644 tsconfig.test.json diff --git a/images.d.ts b/images.d.ts deleted file mode 100644 index 397cc9b..0000000 --- a/images.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module '*.svg' -declare module '*.png' -declare module '*.jpg' diff --git a/package.json b/package.json index b05b526..ce5dc91 100644 --- a/package.json +++ b/package.json @@ -38,5 +38,11 @@ "@types/react-dom": "^16.0.5", "react-scripts": "^2.1.3", "typescript": "^3.3.1" - } + }, + "browserslist": [ + ">0.2%", + "not dead", + "not ie <= 11", + "not op_mini all" + ] } diff --git a/src/react-app-env.d.ts b/src/react-app-env.d.ts new file mode 100644 index 0000000..6431bc5 --- /dev/null +++ b/src/react-app-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/tsconfig.json b/tsconfig.json index 9cd5cdb..0980b23 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,31 +1,25 @@ { "compilerOptions": { - "baseUrl": ".", - "outDir": "build/dist", - "module": "esnext", "target": "es5", - "lib": ["es6", "dom"], - "sourceMap": true, + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], "allowJs": true, - "jsx": "react", - "moduleResolution": "node", - "rootDir": "src", + "skipLibCheck": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, "forceConsistentCasingInFileNames": true, - "noImplicitReturns": true, - "noImplicitThis": true, - "noImplicitAny": true, - "strictNullChecks": true, - "suppressImplicitAnyIndexErrors": true, - "noUnusedLocals": true + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve" }, - "exclude": [ - "node_modules", - "build", - "scripts", - "acceptance-tests", - "webpack", - "jest", - "src/setupTests.ts", - ".vscode-test" + "include": [ + "src" ] } diff --git a/tsconfig.prod.json b/tsconfig.prod.json deleted file mode 100644 index 4144216..0000000 --- a/tsconfig.prod.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./tsconfig.json" -} \ No newline at end of file diff --git a/tsconfig.test.json b/tsconfig.test.json deleted file mode 100644 index 65ffdd4..0000000 --- a/tsconfig.test.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "commonjs" - } -} \ No newline at end of file