chore: update ts and enable noUnusedLocals

This commit is contained in:
Roman Hotsiy 2018-07-17 12:15:22 +03:00
parent bab3e7dfce
commit edc77a2017
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
28 changed files with 19 additions and 57 deletions

View File

@ -1,9 +1,9 @@
import * as webpack from 'webpack';
import * as HtmlWebpackPlugin from 'html-webpack-plugin';
import * as ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import * as CopyWebpackPlugin from 'copy-webpack-plugin';
import { resolve } from 'path';
import * as ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import * as HtmlWebpackPlugin from 'html-webpack-plugin';
import { compact } from 'lodash';
import { resolve } from 'path';
import * as webpack from 'webpack';
const VERSION = JSON.stringify(require('../package.json').version);
const REVISION = JSON.stringify(
@ -51,7 +51,9 @@ export default (env: { playground?: boolean; bench?: boolean } = {}, { mode }) =
root(
env.playground
? 'playground/hmr-playground.tsx'
: env.bench ? '../benchmark/index.tsx' : 'index.tsx',
: env.bench
? '../benchmark/index.tsx'
: 'index.tsx',
),
],
output: {

View File

@ -110,7 +110,7 @@
"ts-node": "^7.0.0",
"tslint": "^5.7.0",
"tslint-react": "^3.4.0",
"typescript": "2.9.1",
"typescript": "^3.0.0-dev.20180712",
"webpack": "^4.16.1",
"webpack-cli": "^3.0.8",
"webpack-dev-server": "^3.1.1",

View File

@ -6,9 +6,7 @@ import * as yaml from 'yaml-js';
import { readFileSync } from 'fs';
import { resolve } from 'path';
// import { filterPropsDeep } from '../../../utils/test-utils';
import { ErrorBoundary, Loading, RedocStandalone, StoreProvider } from '../components/';
import { Loading, RedocStandalone } from '../components/';
describe('Components', () => {
describe('RedocStandalone', () => {

View File

@ -1,4 +1,3 @@
import * as React from 'react';
import Dropdown from 'react-dropdown';
import { StyledComponentClass } from 'styled-components';

View File

@ -1,8 +1,6 @@
import { transparentize } from 'polished';
import * as React from 'react';
import styled, { extensionsHook, withProps } from '../styled-components';
import { deprecatedCss } from './mixins';
export const PropertiesTableCaption = styled.caption`

View File

@ -1,5 +1,4 @@
import { transparentize } from 'polished';
import * as React from 'react';
import styled from '../styled-components';
import { PropertyNameCell } from './fields-layout';

View File

@ -1,5 +1,3 @@
import * as React from 'react';
import styled, { css, extensionsHook } from '../styled-components';
const headerFontSize = {

View File

@ -1,5 +1,3 @@
import * as React from 'react';
import styled, { css } from '../styled-components';
// tslint:disable-next-line

View File

@ -1,4 +1,3 @@
import * as React from 'react';
import styled, { media } from '../styled-components';
export const MiddlePanel = styled.div`

View File

@ -1,5 +1,3 @@
import * as React from 'react';
import styled from '../styled-components';
export const SampleControls = styled.div`

View File

@ -1,4 +1,3 @@
import * as React from 'react';
import styled, { withProps } from '../styled-components';
export const OneOfList = styled.ul`

View File

@ -1,4 +1,4 @@
import { Tabs as ReactTabs, TabsProps } from 'react-tabs';
import { Tabs as ReactTabs } from 'react-tabs';
import styled from '../styled-components';
export { Tab, TabList, TabPanel } from 'react-tabs';

View File

@ -1,5 +1,3 @@
import * as React from 'react';
import { H1, MiddlePanel } from '../../common-elements';
import styled, { extensionsHook } from '../../styled-components';

View File

@ -1,5 +1,3 @@
import * as React from 'react';
import styled, { withProps } from '../../styled-components';
export const OperationEndpointWrap = styled.div`

View File

@ -86,7 +86,7 @@ export interface AdvancedMarkdownProps extends BaseMarkdownProps {
export class AdvancedMarkdown extends React.Component<AdvancedMarkdownProps> {
render() {
const { raw, inline, dense, store, parts } = this.props;
const { inline, dense, store, parts } = this.props;
if (!parts.length) {
return null;

View File

@ -1,5 +1,3 @@
import * as React from 'react';
import { headerCommonMixin, linkifyMixin } from '../../common-elements';
import styled, { css, extensionsHook, withProps } from '../../styled-components';

View File

@ -1,7 +1,6 @@
import * as React from 'react';
import styled from '../../styled-components';
import { DropdownProps, StyledDropdown } from '../../common-elements';
import { StyledDropdown } from '../../common-elements';
export const MimeLabel = styled.div`
border-bottom: 1px solid rgba(255, 255, 255, 0.9);

View File

@ -1,5 +1,3 @@
import * as React from 'react';
import styled, { media } from '../../styled-components';
export const RedocWrap = styled.div`

View File

@ -1,5 +1,4 @@
import { transparentize } from 'polished';
import * as React from 'react';
import { UnderlinedHeader } from '../../common-elements';
import styled from '../../styled-components';

View File

@ -3,7 +3,6 @@ import * as React from 'react';
import { SecuritySchemesModel } from '../../services/models';
import { H2, ShareLink } from '../../common-elements';
import styled from '../../styled-components';
import { OpenAPISecurityScheme } from '../../types';
import { Markdown } from '../Markdown/Markdown';
import { StyledMarkdownBlock } from '../Markdown/styled.elements';
@ -15,16 +14,6 @@ const AUTH_TYPES = {
openIdConnect: 'Open ID Connect',
};
const AuthTable = styled.table`
ul > li {
margin: 0.5em 0 !important;
}
th {
text-transform: capitalize;
}
`;
export interface OAuthFlowProps {
type: string;
flow: OpenAPISecurityScheme['flows'][keyof OpenAPISecurityScheme['flows']];

View File

@ -1,5 +1,4 @@
import * as classnames from 'classnames';
import * as React from 'react';
import { deprecatedCss } from '../../common-elements';
import styled, { css, withProps } from '../../styled-components';

View File

@ -66,7 +66,7 @@ export class StoreProvider extends Component<StoreProviderProps, StoreProviderSt
}
async load() {
const { specUrl, spec, options } = this.props;
const { specUrl, spec } = this.props;
try {
const resolvedSpec = await loadAndBundleSpec(spec || specUrl!);
this.setState({ resolvedSpec, loading: false });

View File

@ -1,11 +1,8 @@
/* tslint:disable:no-implicit-dependencies */
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import * as React from 'react';
import { filterPropsDeep } from '../../utils/test-utils';
import { OneOfSchema, Schema } from '../';
import { OpenAPIParser, SchemaModel } from '../../services';
import { RedocNormalizedOptions } from '../../services/RedocNormalizedOptions';

View File

@ -1,7 +1,6 @@
import { OpenAPIContact, OpenAPIInfo, OpenAPILicense } from '../../types';
import { IS_BROWSER } from '../../utils/';
import { OpenAPIParser } from '../OpenAPIParser';
import { RedocNormalizedOptions } from '../RedocNormalizedOptions';
export class ApiInfoModel implements OpenAPIInfo {
title: string;

View File

@ -1,4 +1,4 @@
import { adjustHue, desaturate, lighten, transparentize } from 'polished';
import { desaturate, lighten, transparentize } from 'polished';
const defaultTheme: ThemeInterface = {
spacingUnit: 20,

View File

@ -5,6 +5,7 @@
"target": "es5",
"noImplicitAny": false,
"noUnusedParameters": true,
"noUnusedLocals": true,
"strictNullChecks": true,
"sourceMap": true,
"declaration": true,

View File

@ -1,6 +1,5 @@
/* tslint:disable:no-implicit-dependencies */
import * as ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import * as HtmlWebpackPlugin from 'html-webpack-plugin';
import * as webpack from 'webpack';
import * as path from 'path';

View File

@ -8496,14 +8496,14 @@ typescript-eslint-parser@^16.0.0:
lodash.unescape "4.0.1"
semver "5.5.0"
typescript@2.9.1:
version "2.9.1"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.1.tgz#fdb19d2c67a15d11995fd15640e373e09ab09961"
typescript@^2.5.1:
version "2.9.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c"
typescript@^3.0.0-dev.20180712:
version "3.0.0-dev.20180712"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.0-dev.20180712.tgz#ffdadf6a5a108c44d5325e83e2afbd088f2a5f84"
ua-parser-js@^0.7.18:
version "0.7.18"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed"