From 092b184f4534a42d36d30d2d10b34b47255d2ee3 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 27 Sep 2018 23:30:11 +0100 Subject: Fix linter --- packages/react-docs/src/components/signature_block.tsx | 4 ++-- packages/react-docs/src/components/type.tsx | 1 - packages/sol-doc/src/solidity_doc_generator.ts | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/react-docs/src/components/signature_block.tsx b/packages/react-docs/src/components/signature_block.tsx index cad72daf4..5ec82983a 100644 --- a/packages/react-docs/src/components/signature_block.tsx +++ b/packages/react-docs/src/components/signature_block.tsx @@ -50,7 +50,7 @@ export class SignatureBlock extends React.Component !_.isEmpty(p.name))); + const hasExclusivelyNamedParams = !_.isUndefined(_.find(method.parameters, p => !_.isEmpty(p.name))); return (
} {method.parameters && !_.isEmpty(method.parameters) && - onlyHasNamedParameters && ( + hasExclusivelyNamedParams && (

ARGUMENTS diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index 8ff2fa3cc..028376ba9 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -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'; diff --git a/packages/sol-doc/src/solidity_doc_generator.ts b/packages/sol-doc/src/solidity_doc_generator.ts index d441b9a23..362fe12c3 100644 --- a/packages/sol-doc/src/solidity_doc_generator.ts +++ b/packages/sol-doc/src/solidity_doc_generator.ts @@ -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 -- cgit v1.2.3