From 89e398fa39fd14c9fd4a467fdd039920fb28a420 Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Wed, 9 Jan 2019 12:12:05 -0800 Subject: Update prettier to version ^1.15.3 --- packages/react-docs/CHANGELOG.json | 12 ++++------- packages/react-docs/README.md | 24 +++++++++++----------- .../react-docs/src/components/doc_reference.tsx | 24 ++++++++++------------ packages/react-docs/src/components/interface.tsx | 3 ++- .../react-docs/src/components/signature_block.tsx | 18 ++++++++-------- packages/react-docs/src/components/type.tsx | 9 +++++--- 6 files changed, 43 insertions(+), 47 deletions(-) (limited to 'packages/react-docs') diff --git a/packages/react-docs/CHANGELOG.json b/packages/react-docs/CHANGELOG.json index 13109e613..02608f18d 100644 --- a/packages/react-docs/CHANGELOG.json +++ b/packages/react-docs/CHANGELOG.json @@ -337,18 +337,15 @@ "version": "0.0.5", "changes": [ { - "note": - "Handle `reflection` type rendering so that anonymous function type declarations render properly", + "note": "Handle `reflection` type rendering so that anonymous function type declarations render properly", "pr": 465 }, { - "note": - "Rename `MethodSignature` to `Signature` and change it's props so that it can be used to render method and function signatures.", + "note": "Rename `MethodSignature` to `Signature` and change it's props so that it can be used to render method and function signatures.", "pr": 465 }, { - "note": - "Rename `MethodBlock` to `SignatureBlock` since it is not used to render method and function signature blocks.", + "note": "Rename `MethodBlock` to `SignatureBlock` since it is not used to render method and function signature blocks.", "pr": 465 }, { @@ -362,8 +359,7 @@ "version": "0.0.3", "changes": [ { - "note": - "Move TS typings from devDependencies to dependencies since they are needed by the package user." + "note": "Move TS typings from devDependencies to dependencies since they are needed by the package user." } ], "timestamp": 1521298800 diff --git a/packages/react-docs/README.md b/packages/react-docs/README.md index 19c092e4d..7b1f4f80a 100644 --- a/packages/react-docs/README.md +++ b/packages/react-docs/README.md @@ -11,15 +11,15 @@ A full-page React component for rendering beautiful documentation for Solidity a #### Features -* Mobile optimized -* Reads Javadoc-style comments in your code to generate class/method/argument/return/type comments. -* Syntax highlighting support for TypeScript & Solidity -* Type declaration linking -* Type declaration popovers to avoid clicking through to the definition -* Section/method/type anchors for easily pointing others to a specific part of your docs. -* Version picker -* Customizable sidebar header -* Supports custom markdown sections so you can easily add an intro or installation instructions. +- Mobile optimized +- Reads Javadoc-style comments in your code to generate class/method/argument/return/type comments. +- Syntax highlighting support for TypeScript & Solidity +- Type declaration linking +- Type declaration popovers to avoid clicking through to the definition +- Section/method/type anchors for easily pointing others to a specific part of your docs. +- Version picker +- Customizable sidebar header +- Supports custom markdown sections so you can easily add an intro or installation instructions. ## Installation @@ -45,9 +45,9 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol Feel free to contribute to these improvements! -* Allow user to pass in styling for all major elements similar to [Material-UI](http://www.material-ui.com/). -* Allow user to define an alternative font and have it change everywhere. -* Add source links to Solidity docs (currently unsupported by solc, which underlies sol-doc). +- Allow user to pass in styling for all major elements similar to [Material-UI](http://www.material-ui.com/). +- Allow user to define an alternative font and have it change everywhere. +- Add source links to Solidity docs (currently unsupported by solc, which underlies sol-doc). ## Contributing diff --git a/packages/react-docs/src/components/doc_reference.tsx b/packages/react-docs/src/components/doc_reference.tsx index 85547576b..424fe9ecf 100644 --- a/packages/react-docs/src/components/doc_reference.tsx +++ b/packages/react-docs/src/components/doc_reference.tsx @@ -194,21 +194,19 @@ export class DocReference extends React.Component{functionDefs} )} - {!_.isUndefined(docSection.events) && - docSection.events.length > 0 && ( -
-

Events

-
{eventDefs}
-
- )} + {!_.isUndefined(docSection.events) && docSection.events.length > 0 && ( +
+

Events

+
{eventDefs}
+
+ )} {!_.isUndefined(docSection.externalExportToLink) && this._renderExternalExports(docSection.externalExportToLink)} - {!_.isUndefined(typeDefs) && - typeDefs.length > 0 && ( -
-
{typeDefs}
-
- )} + {!_.isUndefined(typeDefs) && typeDefs.length > 0 && ( +
+
{typeDefs}
+
+ )}
= (props: InterfaceProps): any typeDefinitionByName={props.typeDefinitionByName} isInPopover={props.isInPopover} /> - )}, + )} + , ); }); diff --git a/packages/react-docs/src/components/signature_block.tsx b/packages/react-docs/src/components/signature_block.tsx index 7cdf19bb0..3189d86cf 100644 --- a/packages/react-docs/src/components/signature_block.tsx +++ b/packages/react-docs/src/components/signature_block.tsx @@ -91,16 +91,14 @@ export class SignatureBlock extends React.Component )} {method.comment && } - {method.parameters && - !_.isEmpty(method.parameters) && - hasExclusivelyNamedParams && ( -
-

- ARGUMENTS -

- {this._renderParameterDescriptions(method.parameters, method.name)} -
- )} + {method.parameters && !_.isEmpty(method.parameters) && hasExclusivelyNamedParams && ( +
+

+ ARGUMENTS +

+ {this._renderParameterDescriptions(method.parameters, method.name)} +
+ )} {method.returnComment && (

diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index fa3b658b4..894c3f560 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -53,7 +53,8 @@ export const Type: React.SFC = (props: TypeProps): any => { typeDefinitionByName={props.typeDefinitionByName} docsInfo={props.docsInfo} isInPopover={props.isInPopover} - />[] + /> + [] ); } else { @@ -181,9 +182,11 @@ export const Type: React.SFC = (props: TypeProps): any => { }); typeName = (
- [{_.reduce(tupleTypes, (prev: React.ReactNode, curr: React.ReactNode) => { + [ + {_.reduce(tupleTypes, (prev: React.ReactNode, curr: React.ReactNode) => { return [prev, ', ', curr]; - })}] + })} + ]
); break; -- cgit v1.2.3