Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove allowSyntheticDefaultImports #61

Merged
merged 3 commits into from Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.

7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -58,10 +58,11 @@
"rmc-dialog": "^1.0.1"
},
"devDependencies": {
"@types/classnames": "^2.2.3",
"@types/mocha": "~2.2.32",
"@types/react": "^15.5.1",
"@types/react-dom": "^15.5.1",
"@types/react-native": "^0.46.9",
"@types/react": "^16.0.0",
"@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
4 changes: 2 additions & 2 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
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
3 changes: 2 additions & 1 deletion src/Popup.native.tsx
@@ -1,6 +1,7 @@
import React from 'react';
import * as React from 'react';
import { View, TouchableHighlight, Text } from 'react-native';
import PopupMixin from './PopupMixin';
import { IPopupPickerProps } from './PopupPickerTypes';
import Modal from 'rmc-dialog/lib/Modal';

const getModal = (props, visible, { getContent, hide, onDismiss, onOk }) => {
Expand Down
3 changes: 2 additions & 1 deletion src/Popup.tsx
@@ -1,6 +1,7 @@
import React from 'react';
import * as React from 'react';
import Modal from 'rmc-dialog';
import PopupMixin from './PopupMixin';
import { IPopupPickerProps } from './PopupPickerTypes';
import Touchable from 'rmc-feedback';

const getModal = (props, visible, { getContent, hide, onDismiss, onOk }) => {
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
4 changes: 2 additions & 2 deletions tsconfig.json
Expand Up @@ -3,7 +3,7 @@
"strictNullChecks": true,
"moduleResolution": "node",
"jsx": "preserve",
"allowSyntheticDefaultImports":true,
"target": "es6"
"target": "es6",
"skipLibCheck": true
}
}
34 changes: 0 additions & 34 deletions typings/custom.d.ts
@@ -1,34 +0,0 @@
declare module "rmc-dialog" {
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 "zscroller" {
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-addons-test-utils" {
var Ret: any;
export default Ret;
}