chore: prettier all

This commit is contained in:
Roman Hotsiy 2018-08-18 16:23:33 +03:00
parent 93e844c3d0
commit 528b8fbebc
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
11 changed files with 40 additions and 16 deletions

View File

@ -28,7 +28,14 @@ export class FieldDetails extends React.PureComponent<FieldProps> {
<div>
<TypePrefix>{schema.typePrefix}</TypePrefix>
<TypeName>{schema.displayType}</TypeName>
{schema.displayFormat && <TypeFormat> &lt;{schema.displayFormat}&gt; </TypeFormat>}
{schema.displayFormat && (
<TypeFormat>
{' '}
&lt;
{schema.displayFormat}
&gt;{' '}
</TypeFormat>
)}
{schema.title && <TypeTitle> ({schema.title}) </TypeTitle>}
<ConstraintsView constraints={schema.constraints} />
{schema.nullable && <NullableLabel> Nullable </NullableLabel>}

View File

@ -34,7 +34,9 @@ export class MediaTypeSamples extends React.Component<PayloadSamplesProps> {
return (
<SmallTabs>
<TabList>
{examplesNames.map(name => <Tab key={name}> {examples[name].summary || name} </Tab>)}
{examplesNames.map(name => (
<Tab key={name}> {examples[name].summary || name} </Tab>
))}
</TabList>
{examplesNames.map(name => (
<TabPanel key={name}>{sampleView(examples[name].value)}</TabPanel>

View File

@ -24,7 +24,7 @@ export const SearchInput = styled.input.attrs({
outline: none;
`;
export const SearchIcon = styled((props: {className?: string}) => (
export const SearchIcon = styled((props: { className?: string }) => (
<svg
className={props.className}
version="1.1"

View File

@ -72,7 +72,9 @@ export class SecurityRequirement extends React.PureComponent<SecurityRequirement
<SecurityRequirementAndWrap key={scheme.id}>
<Link to={scheme.sectionId}>{scheme.id}</Link>
{scheme.scopes.length > 0 && ' ('}
{scheme.scopes.map(scope => <ScopeName key={scope}>{scope}</ScopeName>)}
{scheme.scopes.map(scope => (
<ScopeName key={scope}>{scope}</ScopeName>
))}
{scheme.scopes.length > 0 && ') '}
</SecurityRequirementAndWrap>
);
@ -117,7 +119,9 @@ export class SecurityRequirements extends React.PureComponent<SecurityRequiremen
<AuthHeader>Authorizations: </AuthHeader>
</AuthHeaderColumn>
<SecuritiesColumn>
{securities.map((security, idx) => <SecurityRequirement key={idx} security={security} />)}
{securities.map((security, idx) => (
<SecurityRequirement key={idx} security={security} />
))}
</SecuritiesColumn>
</Wrap>
);

View File

@ -52,12 +52,14 @@ export class MenuStore {
/**
* active item absolute index (when flattened). -1 means nothing is selected
*/
@observable activeItemIdx: number = -1;
@observable
activeItemIdx: number = -1;
/**
* whether sidebar with menu is opened or not
*/
@observable sideBarOpened: boolean = false;
@observable
sideBarOpened: boolean = false;
items: IMenuItem[];
flatItems: IMenuItem[];

View File

@ -10,7 +10,8 @@ import { SchemaModel } from './Schema';
* Field or Parameter model ready to be used by components
*/
export class FieldModel {
@observable expanded: boolean = false;
@observable
expanded: boolean = false;
schema: SchemaModel;
name: string;

View File

@ -21,8 +21,10 @@ export class GroupModel implements IMenuItem {
parent?: GroupModel;
externalDocs?: OpenAPIExternalDocumentation;
@observable active: boolean = false;
@observable expanded: boolean = false;
@observable
active: boolean = false;
@observable
expanded: boolean = false;
depth: number;
level: number;

View File

@ -14,7 +14,8 @@ import { RedocNormalizedOptions } from '../RedocNormalizedOptions';
export class MediaContentModel {
mediaTypes: MediaTypeModel[];
@observable activeMimeIdx = 0;
@observable
activeMimeIdx = 0;
/**
* @param isRequestType needed to know if skipe RO/RW fields in objects

View File

@ -40,9 +40,12 @@ export class OperationModel implements IMenuItem {
depth: number;
@observable ready?: boolean = true;
@observable active: boolean = false;
@observable expanded: boolean = false;
@observable
ready?: boolean = true;
@observable
active: boolean = false;
@observable
expanded: boolean = false;
//#endregion
pointer: string;

View File

@ -9,7 +9,8 @@ import { FieldModel } from './Field';
import { MediaContentModel } from './MediaContent';
export class ResponseModel {
@observable expanded: boolean;
@observable
expanded: boolean;
content?: MediaContentModel;
code: string;

View File

@ -48,7 +48,8 @@ export class SchemaModel {
oneOf?: SchemaModel[];
oneOfType: string;
discriminatorProp: string;
@observable activeOneOf: number = 0;
@observable
activeOneOf: number = 0;
rawSchema: OpenAPISchema;
schema: MergedOpenAPISchema;