Fix linter errors

This commit is contained in:
Leonid Logvinov 2018-01-04 14:53:38 +01:00
parent d0f66f8624
commit c49f68ef3e
No known key found for this signature in database
GPG Key ID: 0DD294BFDE8C95D4
8 changed files with 11 additions and 9 deletions

View File

@ -1,6 +1,6 @@
import { schemas } from '@0xproject/json-schemas';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import { artifacts } from '../artifacts';

View File

@ -1,6 +1,6 @@
import { schemas } from '@0xproject/json-schemas';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import * as Web3 from 'web3';

View File

@ -1,6 +1,6 @@
import { schemas } from '@0xproject/json-schemas';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import { artifacts } from '../artifacts';

View File

@ -1,5 +1,4 @@
import { intervalUtils } from '@0xproject/utils';
import { BigNumber } from '@0xproject/utils';
import { BigNumber, intervalUtils } from '@0xproject/utils';
import { RBTree } from 'bintrees';
import * as _ from 'lodash';

View File

@ -2,9 +2,9 @@ import { assert as sharedAssert } from '@0xproject/assert';
// We need those two unused imports because they're actually used by sharedAssert which gets injected here
// tslint:disable-next-line:no-unused-variable
import { Schema } from '@0xproject/json-schemas';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
// tslint:disable-next-line:no-unused-variable
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import { ECSignature } from '../types';

View File

@ -1,6 +1,6 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as chai from 'chai';
import 'mocha';
import * as Web3 from 'web3';

View File

@ -1,5 +1,5 @@
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { SignedOrder, Token, ZeroEx } from '../../src';
import { artifacts } from '../../src/artifacts';

View File

@ -10,7 +10,7 @@ export const utils = {
if (solType.match(trailingArrayRegex)) {
const arrayItemSolType = solType.replace(trailingArrayRegex, '');
const arrayItemTsType = utils.solTypeToTsType(paramKind, arrayItemSolType);
const arrayTsType = `(${arrayItemTsType})[]`;
const arrayTsType = utils.isUnionType(arrayItemTsType) ? `Array<${arrayItemTsType}>` : `${arrayItemTsType}[]`;
return arrayTsType;
} else {
const solTypeRegexToTsType = [
@ -37,6 +37,9 @@ export const utils = {
throw new Error(`Unknown Solidity type found: ${solType}`);
}
},
isUnionType(tsType: string): boolean {
return tsType === 'number|BigNumber';
},
log(...args: any[]): void {
console.log(...args); // tslint:disable-line:no-console
},