From c8e52882ca556ea06696a56e312f69284f99aa29 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 15 Dec 2017 18:26:45 +0100 Subject: Fix redundant spaces --- .../test/remaining_fillable_calculator_test.ts | 10 ++++---- .../0x.js/test/utils/report_callback_errors.ts | 2 +- packages/assert/test/assert_test.ts | 30 +++++++++++----------- .../test/utils/report_callback_errors.ts | 2 +- packages/tslint-config/package.json | 7 ++--- packages/tslint-config/tslint.json | 4 ++- packages/website/ts/components/token_balances.tsx | 2 +- packages/website/ts/components/top_bar.tsx | 2 +- yarn.lock | 27 +++++++++++++++++++ 9 files changed, 58 insertions(+), 28 deletions(-) diff --git a/packages/0x.js/test/remaining_fillable_calculator_test.ts b/packages/0x.js/test/remaining_fillable_calculator_test.ts index 47ba13cd7..95ef0a4f1 100644 --- a/packages/0x.js/test/remaining_fillable_calculator_test.ts +++ b/packages/0x.js/test/remaining_fillable_calculator_test.ts @@ -2,11 +2,11 @@ import BigNumber from 'bignumber.js'; import * as chai from 'chai'; import 'mocha'; -import { ZeroEx } from '../src/0x'; -import { RemainingFillableCalculator } from '../src/order_watcher/remaining_fillable_calculator'; -import { ECSignature, SignedOrder } from '../src/types'; +import {ZeroEx} from '../src/0x'; +import {RemainingFillableCalculator} from '../src/order_watcher/remaining_fillable_calculator'; +import {ECSignature, SignedOrder} from '../src/types'; -import { chaiSetup } from './utils/chai_setup'; +import {chaiSetup} from './utils/chai_setup'; chaiSetup.configure(); const expect = chai.expect; @@ -26,7 +26,7 @@ describe('RemainingFillableCalculator', () => { const decimals: number = 4; const zero: BigNumber = new BigNumber(0); const zeroAddress = '0x0'; - const signature: ECSignature = { v: 27, r: '', s: ''}; + const signature: ECSignature = {v: 27, r: '', s: ''}; beforeEach(async () => { [makerAmount, takerAmount, makerFeeAmount] = [ZeroEx.toBaseUnitAmount(new BigNumber(50), decimals), ZeroEx.toBaseUnitAmount(new BigNumber(5), decimals), diff --git a/packages/0x.js/test/utils/report_callback_errors.ts b/packages/0x.js/test/utils/report_callback_errors.ts index 8a8f4d966..0aaef3f05 100644 --- a/packages/0x.js/test/utils/report_callback_errors.ts +++ b/packages/0x.js/test/utils/report_callback_errors.ts @@ -1,4 +1,4 @@ -import { DoneCallback } from '../../src/types'; +import {DoneCallback} from '../../src/types'; export const reportCallbackErrors = (done: DoneCallback) => { return (f: (...args: any[]) => void) => { diff --git a/packages/assert/test/assert_test.ts b/packages/assert/test/assert_test.ts index 5fa96e49a..6a9efc748 100644 --- a/packages/assert/test/assert_test.ts +++ b/packages/assert/test/assert_test.ts @@ -25,7 +25,7 @@ describe('Assertions', () => { 'test', 42, false, - { random: 'test' }, + {random: 'test'}, undefined, ]; invalidInputs.forEach(input => expect(assert.isBigNumber.bind(assert, variableName, input)).to.throw()); @@ -43,7 +43,7 @@ describe('Assertions', () => { 'test', 42, false, - { random: 'test' }, + {random: 'test'}, ]; invalidInputs.forEach(input => expect(assert.isUndefined.bind(assert, input, variableName)).to.throw()); }); @@ -60,7 +60,7 @@ describe('Assertions', () => { const invalidInputs = [ 42, false, - { random: 'test' }, + {random: 'test'}, undefined, new BigNumber(45), ]; @@ -79,7 +79,7 @@ describe('Assertions', () => { const invalidInputs = [ 42, false, - { random: 'test' }, + {random: 'test'}, undefined, new BigNumber(45), ]; @@ -98,7 +98,7 @@ describe('Assertions', () => { const invalidInputs = [ 42, false, - { random: 'test' }, + {random: 'test'}, undefined, new BigNumber(45), '0x61a3ed31B43c8780e905a260a35faYfEc527be7516aa11c0256729b5b351bc33', @@ -121,7 +121,7 @@ describe('Assertions', () => { const invalidInputs = [ 42, false, - { random: 'test' }, + {random: 'test'}, undefined, new BigNumber(45), '0x6FFFd0ae3f7d88c9b4925323f54c6e4b2918c5fd', @@ -150,7 +150,7 @@ describe('Assertions', () => { const invalidInputs = [ 42, false, - { random: 'test' }, + {random: 'test'}, undefined, new BigNumber(45), ]; @@ -192,7 +192,7 @@ describe('Assertions', () => { it('should throw for invalid input', () => { const invalidInputs = [ false, - { random: 'test' }, + {random: 'test'}, undefined, new BigNumber(45), ]; @@ -210,7 +210,7 @@ describe('Assertions', () => { it('should throw for invalid input', () => { const invalidInputs = [ 42, - { random: 'test' }, + {random: 'test'}, undefined, new BigNumber(45), ]; @@ -220,8 +220,8 @@ describe('Assertions', () => { describe('#isWeb3Provider', () => { it('should not throw for valid input', () => { const validInputs = [ - { send: () => 45 }, - { sendAsync: () => 45 }, + {send: () => 45}, + {sendAsync: () => 45}, ]; validInputs.forEach(input => expect(assert.isWeb3Provider.bind(assert, variableName, input)).to.not.throw(), @@ -230,7 +230,7 @@ describe('Assertions', () => { it('should throw for invalid input', () => { const invalidInputs = [ 42, - { random: 'test' }, + {random: 'test'}, undefined, new BigNumber(45), ]; @@ -253,7 +253,7 @@ describe('Assertions', () => { it('should throw for invalid input', () => { const invalidInputs = [ 42, - { random: 'test' }, + {random: 'test'}, undefined, new BigNumber(45), ]; @@ -277,7 +277,7 @@ describe('Assertions', () => { it('should throw for invalid input', () => { const invalidInputs = [ 42, - { random: 'test' }, + {random: 'test'}, undefined, new BigNumber(45), 'ws://www.api.example-relayer.net', @@ -309,7 +309,7 @@ describe('Assertions', () => { it('should throw for invalid input', () => { const invalidInputs = [ 42, - { random: 'test' }, + {random: 'test'}, undefined, new BigNumber(45), 'www.google.com', diff --git a/packages/subproviders/test/utils/report_callback_errors.ts b/packages/subproviders/test/utils/report_callback_errors.ts index 8a8f4d966..0aaef3f05 100644 --- a/packages/subproviders/test/utils/report_callback_errors.ts +++ b/packages/subproviders/test/utils/report_callback_errors.ts @@ -1,4 +1,4 @@ -import { DoneCallback } from '../../src/types'; +import {DoneCallback} from '../../src/types'; export const reportCallbackErrors = (done: DoneCallback) => { return (f: (...args: any[]) => void) => { diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json index 3b320e774..888ff675a 100644 --- a/packages/tslint-config/package.json +++ b/packages/tslint-config/package.json @@ -4,9 +4,9 @@ "description": "Lint rules related to 0xProject for TSLint", "main": "tslint.json", "scripts": { - "build": "tsc", - "clean": "shx rm -rf lib", - "lint": "tslint --project . 'rules/**/*.ts'" + "build": "tsc", + "clean": "shx rm -rf lib", + "lint": "tslint --project . 'rules/**/*.ts'" }, "files": [ "tslint.js", @@ -37,6 +37,7 @@ "@types/lodash": "^4.14.86", "shx": "^0.2.2", "tslint": "5.8.0", + "tslint-eslint-rules": "^4.1.1", "typescript": "~2.6.1" }, "dependencies": { diff --git a/packages/tslint-config/tslint.json b/packages/tslint-config/tslint.json index 91185bddb..acb6876c3 100644 --- a/packages/tslint-config/tslint.json +++ b/packages/tslint-config/tslint.json @@ -1,7 +1,8 @@ { "extends": [ "tslint:latest", - "tslint-react" + "tslint-react", + "tslint-eslint-rules" ], "rules": { "adjacent-overload-signatures": true, @@ -54,6 +55,7 @@ "no-unused-variable": [true, {"ignore-pattern": "^_\\d*"}], "no-implicit-dependencies": [true, "dev"], "number-literal-format": true, + "object-curly-spacing": [true, "never"], "object-literal-sort-keys": false, "ordered-imports": [ true, diff --git a/packages/website/ts/components/token_balances.tsx b/packages/website/ts/components/token_balances.tsx index 478114516..b68081c37 100644 --- a/packages/website/ts/components/token_balances.tsx +++ b/packages/website/ts/components/token_balances.tsx @@ -576,7 +576,7 @@ export class TokenBalances extends React.Component +

We apologize -- Dharma loan requests are not available on mobile yet. Please try again through your desktop browser.

diff --git a/packages/website/ts/components/top_bar.tsx b/packages/website/ts/components/top_bar.tsx index 488eef914..27de49620 100644 --- a/packages/website/ts/components/top_bar.tsx +++ b/packages/website/ts/components/top_bar.tsx @@ -124,7 +124,7 @@ export class TopBar extends React.Component { className="text-decoration-none" href={constants.GITHUB_URL} > - + ,