From 025df987863c0bf434aaa0fcf080fec69752deb8 Mon Sep 17 00:00:00 2001 From: duxiaodong Date: Thu, 21 Jun 2018 10:27:23 +0800 Subject: [PATCH 1/2] feat: remove allowSyntheticDefaultImports --- .npmrc | 1 + package.json | 8 ++++---- src/DatePicker.tsx | 2 +- src/Popup.tsx | 2 +- tsconfig.json | 4 ++-- typings/custom.d.ts | 5 ----- 6 files changed, 9 insertions(+), 13 deletions(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..43c97e7 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false diff --git a/package.json b/package.json index fa61295..a3327eb 100644 --- a/package.json +++ b/package.json @@ -58,9 +58,10 @@ }, "devDependencies": { "@types/jest": "^19.2.4", - "@types/react": "^15.5.0", - "@types/react-dom": "^15.5.0", - "@types/react-native": "^0.46.9", + "@types/react": "^16.0.0", + "@types/react-dom": "^16.0.0", + "@types/react-native": "^0.55.0", + "babel-runtime": "6.x", "enzyme": "^2.6.0", "enzyme-to-json": "^1.4.5", "fastclick": "^1.0.6", @@ -78,7 +79,6 @@ "lint" ], "dependencies": { - "babel-runtime": "6.x", "rmc-picker": "~5.0.0" } } diff --git a/src/DatePicker.tsx b/src/DatePicker.tsx index 05a6a03..0f08e21 100644 --- a/src/DatePicker.tsx +++ b/src/DatePicker.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import MultiPicker from 'rmc-picker/lib/MultiPicker'; import Picker from 'rmc-picker/lib/Picker'; import IDatePickerProps from './IDatePickerProps'; diff --git a/src/Popup.tsx b/src/Popup.tsx index a0fb15b..426e8a9 100644 --- a/src/Popup.tsx +++ b/src/Popup.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import IDatePickerProps from './IDatePickerProps'; import PopupPicker from 'rmc-picker/lib/Popup'; import { IPopupPickerProps } from 'rmc-picker/lib/PopupPickerTypes'; diff --git a/tsconfig.json b/tsconfig.json index c029023..d1795c6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "strictNullChecks": true, "moduleResolution": "node", "jsx": "react", - "allowSyntheticDefaultImports":true, - "target": "es6" + "target": "es6", + "skipLibCheck": true } } \ No newline at end of file diff --git a/typings/custom.d.ts b/typings/custom.d.ts index b153085..e69de29 100644 --- a/typings/custom.d.ts +++ b/typings/custom.d.ts @@ -1,5 +0,0 @@ -// declare module "rc-dialog" { -// var Ret: any; -// export default Ret; -// } - From b2e011c970a781037acf1223756e6cc4ec4f51ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AF=92=E6=9E=AD=E4=B8=9C?= Date: Wed, 27 Jun 2018 10:44:48 +0800 Subject: [PATCH 2/2] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a3327eb..d6cb2bd 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,6 @@ "@types/react": "^16.0.0", "@types/react-dom": "^16.0.0", "@types/react-native": "^0.55.0", - "babel-runtime": "6.x", "enzyme": "^2.6.0", "enzyme-to-json": "^1.4.5", "fastclick": "^1.0.6", @@ -79,6 +78,7 @@ "lint" ], "dependencies": { + "babel-runtime": "6.x", "rmc-picker": "~5.0.0" } }