aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/ts/components/generate_order/new_token_form.tsx8
-rw-r--r--packages/website/ts/components/relayer_index/relayer_index.tsx4
-rw-r--r--packages/website/tslint.json3
3 files changed, 8 insertions, 7 deletions
diff --git a/packages/website/ts/components/generate_order/new_token_form.tsx b/packages/website/ts/components/generate_order/new_token_form.tsx
index 10f71b430..a9b8e9589 100644
--- a/packages/website/ts/components/generate_order/new_token_form.tsx
+++ b/packages/website/ts/components/generate_order/new_token_form.tsx
@@ -157,14 +157,14 @@ export class NewTokenForm extends React.Component<NewTokenFormProps, NewTokenFor
const maxLength = 30;
const tokens = _.values(this.props.tokenByAddress);
const tokenWithNameIfExists = _.find(tokens, { name });
- const tokenWithNameExists = !_.isUndefined(tokenWithNameIfExists);
+ const doesTokenWithNameExists = !_.isUndefined(tokenWithNameIfExists);
if (name === '') {
nameErrText = 'Name is required';
} else if (!this._isValidName(name)) {
nameErrText = 'Name should only contain letters, digits and spaces';
} else if (name.length > maxLength) {
nameErrText = `Max length is ${maxLength}`;
- } else if (tokenWithNameExists) {
+ } else if (doesTokenWithNameExists) {
nameErrText = 'Token with this name already exists';
}
@@ -177,14 +177,14 @@ export class NewTokenForm extends React.Component<NewTokenFormProps, NewTokenFor
let symbolErrText = '';
const maxLength = 5;
const tokens = _.values(this.props.tokenByAddress);
- const tokenWithSymbolExists = !_.isUndefined(_.find(tokens, { symbol }));
+ const doesTokenWithSymbolExists = !_.isUndefined(_.find(tokens, { symbol }));
if (symbol === '') {
symbolErrText = 'Symbol is required';
} else if (!this._isAlphanumeric(symbol)) {
symbolErrText = 'Can only include alphanumeric characters';
} else if (symbol.length > maxLength) {
symbolErrText = `Max length is ${maxLength}`;
- } else if (tokenWithSymbolExists) {
+ } else if (doesTokenWithSymbolExists) {
symbolErrText = 'Token with symbol already exists';
}
diff --git a/packages/website/ts/components/relayer_index/relayer_index.tsx b/packages/website/ts/components/relayer_index/relayer_index.tsx
index 8da4e0e10..9ef6eaf59 100644
--- a/packages/website/ts/components/relayer_index/relayer_index.tsx
+++ b/packages/website/ts/components/relayer_index/relayer_index.tsx
@@ -60,8 +60,8 @@ export class RelayerIndex extends React.Component<RelayerIndexProps, RelayerInde
this._isUnmounted = true;
}
public render(): React.ReactNode {
- const readyToRender = _.isUndefined(this.state.error) && !_.isUndefined(this.state.relayerInfos);
- if (!readyToRender) {
+ const isReadyToRender = _.isUndefined(this.state.error) && !_.isUndefined(this.state.relayerInfos);
+ if (!isReadyToRender) {
return (
// TODO: consolidate this loading component with the one in portal
<div className="center">
diff --git a/packages/website/tslint.json b/packages/website/tslint.json
index d6a5f5031..b55ffe90f 100644
--- a/packages/website/tslint.json
+++ b/packages/website/tslint.json
@@ -4,6 +4,7 @@
"no-implicit-dependencies": false,
"no-object-literal-type-assertion": false,
"completed-docs": false,
- "prefer-function-over-method": false
+ "prefer-function-over-method": false,
+ "custom-no-magic-numbers": false
}
}