From 49c23c934522317f287da88cd960158849f3aef7 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Wed, 7 Mar 2018 17:21:45 +0200 Subject: [PATCH] chore: ts-ignore import issue + fix lint errors --- demo/ssr/index.ts | 1 + src/components/Redoc/Redoc.tsx | 2 +- src/services/models/ApiInfo.ts | 4 +++- src/standalone.tsx | 6 +++--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/demo/ssr/index.ts b/demo/ssr/index.ts index 836af8a4..d94076b1 100644 --- a/demo/ssr/index.ts +++ b/demo/ssr/index.ts @@ -1,6 +1,7 @@ import { renderToString } from 'react-dom/server'; import * as React from 'react'; import { ServerStyleSheet } from 'styled-components'; +// @ts-ignore import { Redoc, createStore } from '../../'; import { readFileSync } from 'fs'; import { resolve } from 'path'; diff --git a/src/components/Redoc/Redoc.tsx b/src/components/Redoc/Redoc.tsx index e0b03df4..c5feae26 100644 --- a/src/components/Redoc/Redoc.tsx +++ b/src/components/Redoc/Redoc.tsx @@ -10,7 +10,7 @@ import { ContentItems } from '../ContentItems/ContentItems'; import { OptionsProvider } from '../OptionsProvider'; import { SideMenu } from '../SideMenu/SideMenu'; import { StickyResponsiveSidebar } from '../StickySidebar/StickyResponsiveSidebar'; -import { ApiContent, RedocWrap, BackgroundStub } from './elements'; +import { ApiContent, BackgroundStub, RedocWrap } from './elements'; import { SearchBox } from '../SearchBox/SearchBox'; diff --git a/src/services/models/ApiInfo.ts b/src/services/models/ApiInfo.ts index 3dfa102f..d67557f2 100644 --- a/src/services/models/ApiInfo.ts +++ b/src/services/models/ApiInfo.ts @@ -17,7 +17,9 @@ export class ApiInfoModel implements OpenAPIInfo { } get downloadLink() { - if (this.options.hideDownloadButton) return undefined; + if (this.options.hideDownloadButton) { + return undefined; + } if (this.parser.specUrl) { return this.parser.specUrl; diff --git a/src/standalone.tsx b/src/standalone.tsx index 43482154..ac6025c9 100644 --- a/src/standalone.tsx +++ b/src/standalone.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; -import { render, hydrate as hydrateComponent } from 'react-dom'; +import { hydrate as hydrateComponent, render } from 'react-dom'; -import { RedocStandalone, Redoc } from './components/'; +import { Redoc, RedocStandalone } from './components/'; import { AppStore, StoreState } from './services/AppStore'; -import { querySelector } from './utils/dom'; import { debugTime, debugTimeEnd } from './utils/debug'; +import { querySelector } from './utils/dom'; export { Redoc, AppStore } from '.';