diff --git a/examples/graphql/src/consumer.spec.ts b/examples/graphql/src/consumer.spec.ts index 4e707acce..1680031da 100644 --- a/examples/graphql/src/consumer.spec.ts +++ b/examples/graphql/src/consumer.spec.ts @@ -1,7 +1,7 @@ /* tslint:disable:no-unused-expression object-literal-sort-keys max-classes-per-file no-empty */ -import * as chai from 'chai'; +import chai from 'chai'; import * as path from 'path'; -import * as chaiAsPromised from 'chai-as-promised'; +import chaiAsPromised from 'chai-as-promised'; import { query } from './consumer'; import { Pact, diff --git a/examples/graphql/src/provider.ts b/examples/graphql/src/provider.ts index de0796159..f4cb5822d 100644 --- a/examples/graphql/src/provider.ts +++ b/examples/graphql/src/provider.ts @@ -1,4 +1,4 @@ -import * as express from 'express'; +import express from 'express'; import { createHandler } from 'graphql-http/lib/use/express'; import { buildSchema } from 'graphql'; diff --git a/examples/typescript/src/index.ts b/examples/typescript/src/index.ts index 46445bab1..5aa399de2 100644 --- a/examples/typescript/src/index.ts +++ b/examples/typescript/src/index.ts @@ -1,5 +1,4 @@ import axios, { AxiosPromise } from 'axios'; - export class DogService { private url: string; private port: number; diff --git a/examples/typescript/test/get-dog.spec.ts b/examples/typescript/test/get-dog.spec.ts index 187a74eca..dc4f69ca9 100644 --- a/examples/typescript/test/get-dog.spec.ts +++ b/examples/typescript/test/get-dog.spec.ts @@ -1,8 +1,8 @@ /* tslint:disable:no-unused-expression object-literal-sort-keys max-classes-per-file no-empty */ -import * as chai from 'chai'; -import * as chaiAsPromised from 'chai-as-promised'; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; import path = require('path'); -import * as sinonChai from 'sinon-chai'; +import sinonChai from 'sinon-chai'; import { Pact, Interaction, Matchers, LogLevel } from '@pact-foundation/pact'; const expect = chai.expect; diff --git a/examples/v3/typescript/test/user.spec.ts b/examples/v3/typescript/test/user.spec.ts index effecd5ac..17c44e521 100644 --- a/examples/v3/typescript/test/user.spec.ts +++ b/examples/v3/typescript/test/user.spec.ts @@ -1,7 +1,6 @@ -import * as chai from 'chai'; -import * as chaiAsPromised from 'chai-as-promised'; -import * as path from 'path'; -import * as sinonChai from 'sinon-chai'; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import sinonChai from 'sinon-chai'; import { PactV3, MatchersV3, LogLevel } from '@pact-foundation/pact'; import { UserService } from '../index'; const { like } = MatchersV3; diff --git a/src/common/net.ts b/src/common/net.ts index 0774040b4..00701df1e 100644 --- a/src/common/net.ts +++ b/src/common/net.ts @@ -4,7 +4,7 @@ * @private */ -import * as net from 'net'; +import net from 'net'; export const localAddresses = ['127.0.0.1', 'localhost', '0.0.0.0', '::1']; diff --git a/src/dsl/verifier/proxy/parseBody.ts b/src/dsl/verifier/proxy/parseBody.ts index 2090b33f7..96a9d5418 100644 --- a/src/dsl/verifier/proxy/parseBody.ts +++ b/src/dsl/verifier/proxy/parseBody.ts @@ -1,4 +1,4 @@ -import * as http from 'http'; +import http from 'http'; interface ReqBodyExtended extends http.IncomingMessage { body?: Buffer | Record; diff --git a/src/dsl/verifier/proxy/proxy.spec.ts b/src/dsl/verifier/proxy/proxy.spec.ts index 852a15dd0..09a34c3a4 100644 --- a/src/dsl/verifier/proxy/proxy.spec.ts +++ b/src/dsl/verifier/proxy/proxy.spec.ts @@ -1,7 +1,7 @@ import chai from 'chai'; import chaiAsPromised from 'chai-as-promised'; -import * as http from 'http'; +import http from 'http'; import { waitForServerReady } from './proxy'; diff --git a/src/dsl/verifier/proxy/proxy.ts b/src/dsl/verifier/proxy/proxy.ts index 1c0bd6185..8648621c1 100644 --- a/src/dsl/verifier/proxy/proxy.ts +++ b/src/dsl/verifier/proxy/proxy.ts @@ -1,7 +1,7 @@ import express from 'express'; import HttpProxy from 'http-proxy'; import bodyParser from 'body-parser'; -import * as http from 'http'; +import http from 'http'; import { ProxyOptions } from './types'; import logger from '../../../common/logger'; diff --git a/src/dsl/verifier/proxy/types.ts b/src/dsl/verifier/proxy/types.ts index dda9c9699..c9c538145 100644 --- a/src/dsl/verifier/proxy/types.ts +++ b/src/dsl/verifier/proxy/types.ts @@ -1,4 +1,4 @@ -import * as express from 'express'; +import express from 'express'; import { LogLevel } from '../../options'; import { JsonMap, AnyJson } from '../../../common/jsonTypes'; import { MessageProviders } from '../../message'; diff --git a/src/dsl/verifier/verifier.ts b/src/dsl/verifier/verifier.ts index d258dfc98..cfd37af7e 100644 --- a/src/dsl/verifier/verifier.ts +++ b/src/dsl/verifier/verifier.ts @@ -6,8 +6,8 @@ import serviceFactory, { VerifierOptions as PactCoreVerifierOptions, } from '@pact-foundation/pact-core'; import { omit, isEmpty } from 'lodash'; -import * as http from 'http'; -import * as url from 'url'; +import http from 'http'; +import url from 'url'; import { AddressInfo } from 'net'; import logger, { setLogLevel } from '../../common/logger'; diff --git a/src/httpPact/index.ts b/src/httpPact/index.ts index 5e5f140c3..caa76f32e 100644 --- a/src/httpPact/index.ts +++ b/src/httpPact/index.ts @@ -5,7 +5,7 @@ import serviceFactory, { } from '@pact-foundation/pact-core'; import chalk from 'chalk'; -import * as path from 'path'; +import path from 'path'; import process from 'process'; import { isEmpty } from 'lodash'; diff --git a/src/messageProviderPact.spec.ts b/src/messageProviderPact.spec.ts index 9e49e23c6..19a2b9ad6 100644 --- a/src/messageProviderPact.spec.ts +++ b/src/messageProviderPact.spec.ts @@ -1,8 +1,8 @@ -import * as chai from 'chai'; +import chai from 'chai'; import chaiAsPromised from 'chai-as-promised'; import sinonChai from 'sinon-chai'; import express from 'express'; -import * as http from 'http'; +import http from 'http'; import { Message } from './dsl/message'; import { MessageProviderPact, diff --git a/src/messageProviderPact.ts b/src/messageProviderPact.ts index e9e033f97..2d078ead6 100644 --- a/src/messageProviderPact.ts +++ b/src/messageProviderPact.ts @@ -6,7 +6,7 @@ import { omit, isEmpty } from 'lodash'; import serviceFactory, { VerifierOptions } from '@pact-foundation/pact-core'; import express from 'express'; -import * as http from 'http'; +import http from 'http'; import bodyParser from 'body-parser'; import { encode as encodeBase64 } from 'js-base64'; diff --git a/src/v3/matchers.spec.ts b/src/v3/matchers.spec.ts index 6e49ec2f3..08996a9ba 100644 --- a/src/v3/matchers.spec.ts +++ b/src/v3/matchers.spec.ts @@ -1,4 +1,4 @@ -import * as chai from 'chai'; +import chai from 'chai'; import * as MatchersV3 from './matchers'; const { expect } = chai; diff --git a/src/v3/xml/xmlElement.spec.ts b/src/v3/xml/xmlElement.spec.ts index 96624a33c..79f622ced 100644 --- a/src/v3/xml/xmlElement.spec.ts +++ b/src/v3/xml/xmlElement.spec.ts @@ -1,4 +1,4 @@ -import * as chai from 'chai'; +import chai from 'chai'; import { describe } from 'mocha'; import { XmlText } from './xmlText'; import { XmlElement } from './xmlElement';