Skip to content

Commit

Permalink
remove allowSyntheticDefaultImports
Browse files Browse the repository at this point in the history
  • Loading branch information
doxiaodong committed May 7, 2018
1 parent a02e81f commit c4b54b5
Show file tree
Hide file tree
Showing 24 changed files with 59 additions and 61 deletions.
1 change: 1 addition & 0 deletions .npmrc
@@ -0,0 +1 @@
package-lock=false
2 changes: 1 addition & 1 deletion examples/multi-picker.native.tsx
@@ -1,7 +1,7 @@
/* tslint:disable:no-console */
import MultiPicker from '../src/MultiPicker';
import Picker from '../src/Picker';
import React from 'react';
import * as React from 'react';
import { View } from 'react-native';

export class Test extends React.Component<any, any> {
Expand Down
4 changes: 2 additions & 2 deletions examples/multi-picker.tsx
Expand Up @@ -2,8 +2,8 @@

import '../assets/index.less';
import MultiPicker from '../src/MultiPicker';
import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import Picker from '../src/Picker';

class Test extends React.Component<any, any> {
Expand Down
2 changes: 1 addition & 1 deletion examples/picker.native.tsx
Expand Up @@ -2,7 +2,7 @@

import { View, TouchableHighlight, StyleSheet, Text } from 'react-native';
import Picker from '../src/Picker';
import React from 'react';
import * as React from 'react';

let count = 0;
const len = 10;
Expand Down
4 changes: 2 additions & 2 deletions examples/picker.tsx
Expand Up @@ -2,8 +2,8 @@

import 'rmc-picker/assets/index.less';
import Picker from '../src/Picker';
import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';

let count = 0;
const len = 10;
Expand Down
2 changes: 1 addition & 1 deletion examples/popup.native.tsx
@@ -1,7 +1,7 @@
import { View, TouchableHighlight, StyleSheet, Text, ScrollView } from 'react-native';
import Popup from '../src/Popup';
import PopupStyles from '../src/PopupStyles';
import React from 'react';
import * as React from 'react';

const styles = StyleSheet.create({
button: {
Expand Down
4 changes: 2 additions & 2 deletions examples/popup.tsx
Expand Up @@ -2,8 +2,8 @@

import 'rmc-picker/assets/index.less';
import 'rmc-picker/assets/popup.less';
import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import Popup from '../src/Popup';

class Demo extends React.Component<any, any> {
Expand Down
3 changes: 0 additions & 3 deletions index.js

This file was deleted.

5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -55,10 +55,11 @@
"rmc-dialog": "^1.0.1"
},
"devDependencies": {
"@types/classnames": "^2.2.3",
"@types/mocha": "~2.2.32",
"@types/react": "^16.0.0",
"@types/react-dom": "^15.5.1",
"@types/react-native": "^0.46.9",
"@types/react-dom": "^16.0.5",
"@types/react-native": "^0.55.12",
"array-tree-filter": "1.x",
"expect.js": "0.3.x",
"fastclick": "^1.0.6",
Expand Down
2 changes: 1 addition & 1 deletion src/MultiPicker.native.tsx
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { View } from 'react-native';
import MultiPickerProps from './MultiPickerProps';
import MultiPickerMixin from './MultiPickerMixin';
Expand Down
4 changes: 2 additions & 2 deletions src/MultiPicker.tsx
@@ -1,5 +1,5 @@
import React from 'react';
import classnames from 'classnames';
import * as React from 'react';
import * as classnames from 'classnames';
import MultiPickerProps from './MultiPickerProps';
import MultiPickerMixin from './MultiPickerMixin';

Expand Down
2 changes: 1 addition & 1 deletion src/MultiPickerMixin.tsx
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import MultiPickerProps from './MultiPickerProps';

export default function(ComposedComponent) {
Expand Down
2 changes: 1 addition & 1 deletion src/NativePicker.android.tsx
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { ScrollView, View, StyleSheet, PixelRatio, Text } from 'react-native';
import PickerMixin from './PickerMixin';
import { IPickerProps } from './PickerTypes';
Expand Down
2 changes: 1 addition & 1 deletion src/NativePicker.ios.tsx
@@ -1 +1 @@
export { Picker as default } from 'react-native';
export { Picker as default } from 'react-native';
2 changes: 1 addition & 1 deletion src/Picker.native.tsx
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import NativePicker from './NativePicker';
import { IPickerProps } from './PickerTypes';

Expand Down
6 changes: 3 additions & 3 deletions src/Picker.tsx
@@ -1,5 +1,5 @@
import React from 'react';
import classNames from 'classnames';
import * as React from 'react';
import * as classNames from 'classnames';
import { IPickerProps } from './PickerTypes';
import PickerMixin from './PickerMixin';

Expand Down Expand Up @@ -38,7 +38,7 @@ class Picker extends React.Component<IPickerProp & IPickerProps, any> {
nodeStyle.webkitTransition = value;
};

const scrollTo = (x, y, time = .3) => {
const scrollTo = (_x, y, time = .3) => {
if (scrollY !== y) {
scrollY = y;
if (time && !this.props.noAnimate) {
Expand Down
2 changes: 1 addition & 1 deletion src/PickerMixin.tsx
@@ -1,5 +1,5 @@
/* tslint:disable:no-console */
import React from 'react';
import * as React from 'react';
import { IPickerProps } from './PickerTypes';

type IItemProps = {
Expand Down
2 changes: 1 addition & 1 deletion src/Popup.native.tsx
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { View, TouchableHighlight, Text } from 'react-native';
import PopupMixin from './PopupMixin';
import Modal from 'rmc-dialog/lib/Modal';
Expand Down
2 changes: 1 addition & 1 deletion src/Popup.tsx
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import Modal from 'rmc-dialog';
import PopupMixin from './PopupMixin';
import Touchable from 'rmc-feedback';
Expand Down
2 changes: 1 addition & 1 deletion src/PopupMixin.tsx
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { IPopupPickerProps } from './PopupPickerTypes';

export default function PopupMixin(getModal, platformProps) {
Expand Down
2 changes: 1 addition & 1 deletion src/PopupPickerTypes.tsx
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';

export type IPopupPickerProps = {
picker?: any;
Expand Down
6 changes: 3 additions & 3 deletions tests/usage.tsx
@@ -1,9 +1,9 @@
import '../assets/index.less';
import expect from 'expect.js';
import TestUtils from 'react-dom/test-utils';
import * as TestUtils from 'react-dom/test-utils';
// tslint:disable-next-line
import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import Picker from '../src/index';

function offsetTop(el) {
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Expand Up @@ -3,7 +3,6 @@
"strictNullChecks": true,
"moduleResolution": "node",
"jsx": "preserve",
"allowSyntheticDefaultImports":true,
"target": "es6"
}
}
56 changes: 28 additions & 28 deletions typings/custom.d.ts
@@ -1,34 +1,34 @@
declare module "rmc-dialog" {
var Ret: any;
export default Ret;
}
// declare module 'rmc-dialog' {
// var Ret: any;
// export default Ret;
// }

declare module "rmc-feedback" {
var Ret: any;
export default Ret;
}
// declare module "rmc-feedback" {
// var Ret: any;
// export default Ret;
// }

declare module "classnames" {
var Ret: any;
export default Ret;
}
// declare module 'classnames' {
// var Ret: any;
// export default Ret;
// }

declare module "zscroller" {
var Ret: any;
export default Ret;
}
// declare module 'zscroller' {
// var Ret: any;
// export default Ret;
// }

declare module "expect.js" {
var Ret: any;
export default Ret;
}
// declare module 'expect.js' {
// var Ret: any;
// export default Ret;
// }

declare module "react-native-picker-android" {
var Ret: any;
export default Ret;
}
// declare module 'react-native-picker-android' {
// var Ret: any;
// export default Ret;
// }

declare module "react-addons-test-utils" {
var Ret: any;
export default Ret;
}
// declare module 'react-addons-test-utils' {
// var Ret: any;
// export default Ret;
// }

0 comments on commit c4b54b5

Please sign in to comment.