diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-23 06:39:20 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-24 05:13:37 +0800 |
commit | 2fa5bb20287c26d404e2c0a372291ae5d9626888 (patch) | |
tree | df9967ac1e60dabfeee0897c3e2d356b66797519 | |
parent | 010e6f8d7f7403cb91c020fc501fdb4f59861c58 (diff) | |
download | dexon-sol-tools-2fa5bb20287c26d404e2c0a372291ae5d9626888.tar dexon-sol-tools-2fa5bb20287c26d404e2c0a372291ae5d9626888.tar.gz dexon-sol-tools-2fa5bb20287c26d404e2c0a372291ae5d9626888.tar.bz2 dexon-sol-tools-2fa5bb20287c26d404e2c0a372291ae5d9626888.tar.lz dexon-sol-tools-2fa5bb20287c26d404e2c0a372291ae5d9626888.tar.xz dexon-sol-tools-2fa5bb20287c26d404e2c0a372291ae5d9626888.tar.zst dexon-sol-tools-2fa5bb20287c26d404e2c0a372291ae5d9626888.zip |
Autofix json-schemas linter errors
-rw-r--r-- | packages/assert/package.json | 2 | ||||
-rw-r--r-- | packages/connect/package.json | 2 | ||||
-rw-r--r-- | packages/json-schemas/src/schema_validator.ts | 3 | ||||
-rw-r--r-- | packages/json-schemas/src/schemas.ts | 50 | ||||
-rw-r--r-- | packages/json-schemas/test/schema_test.ts | 11 |
5 files changed, 35 insertions, 33 deletions
diff --git a/packages/assert/package.json b/packages/assert/package.json index d0f40c66e..61eea2de7 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -7,7 +7,7 @@ "scripts": { "build": "tsc", "clean": "shx rm -rf _bundles lib test_temp", - "lint": "tslint src/**/*.ts test/**/*.ts", + "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", "run_mocha": "mocha lib/test/**/*_test.js", "prepublishOnly": "run-p build", "test": "run-s clean build run_mocha", diff --git a/packages/connect/package.json b/packages/connect/package.json index 9131eef14..7da40ced4 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -17,7 +17,7 @@ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_DIR", "upload_docs_json": "aws s3 cp docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type aplication/json", "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", - "lint": "tslint src/**/*.ts test/**/*.ts", + "lint": "tslint 'src/**/*.ts' 'test/**/*.ts'", "run_mocha": "mocha lib/test/**/*_test.js", "test": "run-s clean build copy_test_fixtures run_mocha", "test:circleci": "yarn test" diff --git a/packages/json-schemas/src/schema_validator.ts b/packages/json-schemas/src/schema_validator.ts index 0bc88cc45..c91f49340 100644 --- a/packages/json-schemas/src/schema_validator.ts +++ b/packages/json-schemas/src/schema_validator.ts @@ -1,5 +1,6 @@ +import {Schema, Validator, ValidatorResult} from 'jsonschema'; import values = require('lodash.values'); -import {Validator, ValidatorResult, Schema} from 'jsonschema'; + import {schemas} from './schemas'; export class SchemaValidator { diff --git a/packages/json-schemas/src/schemas.ts b/packages/json-schemas/src/schemas.ts index a8e5ecbcb..69164cbc7 100644 --- a/packages/json-schemas/src/schemas.ts +++ b/packages/json-schemas/src/schemas.ts @@ -1,10 +1,10 @@ import { - numberSchema, addressSchema, + numberSchema, } from '../schemas/basic_type_schemas'; import { - ecSignatureSchema, ecSignatureParameterSchema, + ecSignatureSchema, } from '../schemas/ec_signature_schema'; import { indexFilterValuesSchema, @@ -26,24 +26,25 @@ import { signedOrderSchema, } from '../schemas/order_schemas'; import { - blockParamSchema, - subscriptionOptsSchema, -} from '../schemas/subscription_opts_schema'; -import { - tokenSchema, -} from '../schemas/token_schema'; -import { - signedOrdersSchema, -} from '../schemas/signed_orders_schema'; -import { relayerApiErrorResponseSchema, } from '../schemas/relayer_api_error_response_schema'; import { + relayerApiFeesPayloadSchema, +} from '../schemas/relayer_api_fees_payload_schema'; +import { relayerApiFeesResponseSchema, } from '../schemas/relayer_api_fees_response_schema'; import { - relayerApiFeesPayloadSchema, -} from '../schemas/relayer_api_fees_payload_schema'; + relayerApiOrderbookChannelSubscribePayload, + relayerApiOrderbookChannelSubscribeSchema, +} from '../schemas/relayer_api_orberbook_channel_subscribe_schema'; +import { + relayerApiOrderbookChannelSnapshotPayload, + relayerApiOrderbookChannelSnapshotSchema, +} from '../schemas/relayer_api_orderbook_channel_snapshot_schema'; +import { + relayerApiOrderbookChannelUpdateSchema, +} from '../schemas/relayer_api_orderbook_channel_update_response_schema'; import { relayerApiOrderBookResponseSchema, } from '../schemas/relayer_api_orderbook_response_schema'; @@ -52,20 +53,19 @@ import { relayerApiTokenTradeInfoSchema, } from '../schemas/relayer_api_token_pairs_response_schema'; import { - jsNumber, - txDataSchema, -} from '../schemas/tx_data_schema'; + signedOrdersSchema, +} from '../schemas/signed_orders_schema'; import { - relayerApiOrderbookChannelSubscribeSchema, - relayerApiOrderbookChannelSubscribePayload, -} from '../schemas/relayer_api_orberbook_channel_subscribe_schema'; + blockParamSchema, + subscriptionOptsSchema, +} from '../schemas/subscription_opts_schema'; import { - relayerApiOrderbookChannelUpdateSchema, -} from '../schemas/relayer_api_orderbook_channel_update_response_schema'; + tokenSchema, +} from '../schemas/token_schema'; import { - relayerApiOrderbookChannelSnapshotSchema, - relayerApiOrderbookChannelSnapshotPayload, -} from '../schemas/relayer_api_orderbook_channel_snapshot_schema'; + jsNumber, + txDataSchema, +} from '../schemas/tx_data_schema'; export const schemas = { numberSchema, diff --git a/packages/json-schemas/test/schema_test.ts b/packages/json-schemas/test/schema_test.ts index 0ff456dec..30f6c4ad1 100644 --- a/packages/json-schemas/test/schema_test.ts +++ b/packages/json-schemas/test/schema_test.ts @@ -1,10 +1,11 @@ -import 'mocha'; -import forEach = require('lodash.foreach'); -import * as dirtyChai from 'dirty-chai'; -import * as chai from 'chai'; import BigNumber from 'bignumber.js'; +import * as chai from 'chai'; +import * as dirtyChai from 'dirty-chai'; import promisify = require('es6-promisify'); -import {SchemaValidator, schemas} from '../src/index'; +import forEach = require('lodash.foreach'); +import 'mocha'; + +import {schemas, SchemaValidator} from '../src/index'; chai.config.includeStack = true; chai.use(dirtyChai); |