Fix linter

This commit is contained in:
Fabio Berger 2018-09-27 23:30:11 +01:00
parent b2ff7bda02
commit 092b184f45
3 changed files with 4 additions and 3 deletions

View File

@ -50,7 +50,7 @@ export class SignatureBlock extends React.Component<SignatureBlockProps, Signatu
const method = this.props.method;
const isFallback = (method as SolidityMethod).isFallback;
const onlyHasNamedParameters = !_.isUndefined(_.find(method.parameters, p => !_.isEmpty(p.name)));
const hasExclusivelyNamedParams = !_.isUndefined(_.find(method.parameters, p => !_.isEmpty(p.name)));
return (
<div
id={`${this.props.sectionName}-${method.name}`}
@ -99,7 +99,7 @@ export class SignatureBlock extends React.Component<SignatureBlockProps, Signatu
{method.comment && <Comment comment={method.comment} className="py2" />}
{method.parameters &&
!_.isEmpty(method.parameters) &&
onlyHasNamedParameters && (
hasExclusivelyNamedParams && (
<div>
<h4 className="pb1 thin" style={{ borderBottom: '1px solid #e1e8ed' }}>
ARGUMENTS

View File

@ -7,7 +7,6 @@ import { Link as ScrollLink } from 'react-scroll';
import * as ReactTooltip from 'react-tooltip';
import { DocsInfo } from '../docs_info';
import { constants } from '../utils/constants';
import { Signature } from './signature';
import { TypeDefinition } from './type_definition';

View File

@ -490,6 +490,7 @@ function _getTypeFromDataItem(dataItem: DataItem): Type {
const isArrayType = _.endsWith(dataItem.type, '[]');
let type: Type;
if (isArrayType) {
// tslint:disable-next-line:custom-no-magic-numbers
typeName = typeDocType === TypeDocTypes.Intrinsic ? typeName.slice(0, -2) : typeName;
type = {
elementType: { name: typeName, typeDocType },
@ -501,3 +502,4 @@ function _getTypeFromDataItem(dataItem: DataItem): Type {
}
return type;
}
// tslint:disable:max-file-line-count