提交 a6dc787e 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

make new TypeScript option `esModuleInterop` happy

上级 97c7e58e
......@@ -19,7 +19,7 @@
*/
// tslint:disable:no-shadowed-variable
import test from 'blue-tape'
// import * as sinon from 'sinon'
// import sinon from 'sinon'
import {
cloneClass,
......
......@@ -19,7 +19,7 @@
*/
// tslint:disable:no-shadowed-variable
import test from 'blue-tape'
// import * as sinon from 'sinon'
// import sinon from 'sinon'
// const sinonTest = require('sinon-test')(sinon)
import { config } from './config'
......
......@@ -16,13 +16,13 @@
* limitations under the License.
*
*/
import * as fs from 'fs'
import * as os from 'os'
import * as path from 'path'
import fs from 'fs'
import os from 'os'
import path from 'path'
import * as readPkgUp from 'read-pkg-up'
import * as Raven from 'raven'
import * as qrImage from 'qr-image'
import readPkgUp from 'read-pkg-up'
import Raven from 'raven'
import qrImage from 'qr-image'
import { log } from 'brolog'
import {
......
#!/usr/bin/env ts-node
import * as test from 'blue-tape'
// import * as sinon from 'sinon'
import test from 'blue-tape'
// import sinon from 'sinon'
import {
cloneClass,
......
......@@ -16,7 +16,7 @@
* limitations under the License.
*
*/
import * as express from 'express'
import express from 'express'
/**
* DO NOT use `require('../')` here!
* because it will casue a LOOP require ERROR
......
......@@ -16,7 +16,7 @@
* limitations under the License.
*
*/
import * as WebSocket from 'ws'
import WebSocket from 'ws'
import StateSwitch from 'state-switch'
import {
......
......@@ -16,8 +16,8 @@
* limitations under the License.
* @ignore
*/
// import * as path from 'path'
// import * as cuid from 'cuid'
// import path from 'path'
// import cuid from 'cuid'
import {
FileBox,
......
......@@ -18,12 +18,12 @@
*
*/
// tslint:disable:no-shadowed-variable
import * as test from 'blue-tape'
import * as sinon from 'sinon'
import test from 'blue-tape'
import sinon from 'sinon'
// const sinonTest = require('sinon-test')(sinon)
import * as http from 'http'
import * as express from 'express'
import http from 'http'
import express from 'express'
import promiseRetry = require('promise-retry')
......
......@@ -16,16 +16,16 @@
* limitations under the License.
*
*/
import * as crypto from 'crypto'
import * as https from 'https'
import * as http from 'http'
import * as net from 'net'
import crypto from 'crypto'
import https from 'https'
import http from 'http'
import net from 'net'
import {
Readable,
} from 'stream'
import * as url from 'url'
import url from 'url'
import * as cuid from 'cuid'
import cuid from 'cuid'
import promiseRetry = require('promise-retry')
import { WrapOptions } from 'retry'
......
......@@ -16,7 +16,7 @@
* limitations under the License.
*
*/
import * as path from 'path'
import path from 'path'
import {
FileBox,
......
......@@ -17,9 +17,9 @@
*
*/
// import * as path from 'path'
// import * as fs from 'fs'
// import * as cuid from 'cuid'
// import path from 'path'
// import fs from 'fs'
// import cuid from 'cuid'
import LRU from 'lru-cache'
......
#!/usr/bin/env ts-node
// tslint:disable:no-shadowed-variable
import * as test from 'blue-tape'
import test from 'blue-tape'
import {
PadchatPureFunctionHelper as pfHelper,
......
......@@ -17,10 +17,10 @@
* limitations under the License.
*
*/
import * as test from 'blue-tape'
import test from 'blue-tape'
// tslint:disable:no-shadowed-variable
// import * as sinon from 'sinon'
// import sinon from 'sinon'
// const sinonTest = require('sinon-test')(sinon)
import {
......
......@@ -17,8 +17,8 @@
*
*/
import { EventEmitter } from 'events'
import * as fs from 'fs'
import * as path from 'path'
import fs from 'fs'
import path from 'path'
import {
Browser,
......
......@@ -18,9 +18,9 @@
* limitations under the License.
*
*/
import * as test from 'blue-tape'
import test from 'blue-tape'
// tslint:disable:no-shadowed-variable
// import * as sinon from 'sinon'
// import sinon from 'sinon'
import {
MemoryCard,
......
......@@ -23,8 +23,8 @@
*/
// tslint:disable:no-shadowed-variable
import * as test from 'blue-tape'
// import * as sinon from 'sinon'
import test from 'blue-tape'
// import sinon from 'sinon'
// const sinonTest = require('sinon-test')(sinon)
import { PuppetPuppeteer } from './puppet-puppeteer'
......
......@@ -19,7 +19,7 @@
/* tslint:disable:no-var-requires */
// const retryPromise = require('retry-promise').default
// import * as cuid from 'cuid'
// import cuid from 'cuid'
import {
log,
......
......@@ -18,8 +18,8 @@
*
*/
// tslint:disable:no-shadowed-variable
import * as test from 'blue-tape'
// import * as sinon from 'sinon'
import test from 'blue-tape'
// import sinon from 'sinon'
import {
PuppetPuppeteer,
......
......@@ -18,8 +18,8 @@
*
*/
// tslint:disable:no-shadowed-variable
import * as test from 'blue-tape'
import * as sinon from 'sinon'
import test from 'blue-tape'
import sinon from 'sinon'
const sinonTest = require('sinon-test')(sinon, {
useFakeTimers: { // https://github.com/sinonjs/lolex
shouldAdvanceTime : true,
......
......@@ -16,13 +16,13 @@
* limitations under the License.
*
*/
// import * as http from 'http'
import * as path from 'path'
import * as nodeUrl from 'url'
// import http from 'http'
import path from 'path'
import nodeUrl from 'url'
import * as bl from 'bl'
import * as mime from 'mime'
import * as request from 'request'
import bl from 'bl'
import mime from 'mime'
import request from 'request'
// import cloneClass from 'clone-class'
import {
......
......@@ -19,8 +19,8 @@
*
*/
// tslint:disable:no-shadowed-variable
import * as test from 'blue-tape'
import * as sinon from 'sinon'
import test from 'blue-tape'
import sinon from 'sinon'
import {
cloneClass,
......
......@@ -18,8 +18,8 @@
*
*/
// tslint:disable:no-shadowed-variable
import * as test from 'blue-tape'
import * as sinon from 'sinon'
import test from 'blue-tape'
import sinon from 'sinon'
// const sinonTest = require('sinon-test')(sinon)
import {
......
......@@ -18,8 +18,8 @@
*
*/
// tslint:disable:no-shadowed-variable
import * as test from 'blue-tape'
import * as sinon from 'sinon'
import test from 'blue-tape'
import sinon from 'sinon'
// const sinonTest = require('sinon-test')(sinon)
import {
......
......@@ -19,8 +19,8 @@
*
*/
// tslint:disable:no-shadowed-variable
import * as test from 'blue-tape'
import * as sinon from 'sinon'
import test from 'blue-tape'
import sinon from 'sinon'
// import cloneClass from 'clone-class'
import {
......
......@@ -16,14 +16,14 @@
* limitations under the License.
*
*/
import * as LRU from 'lru-cache'
import LRU from 'lru-cache'
import {
FileBox,
} from 'file-box'
// tslint:disable-next-line
import * as Wechat4u from 'wechat4u'
import Wechat4u from 'wechat4u'
import { Misc } from '../misc'
......
#!/usr/bin/env ts-node
// tslint:disable:no-shadowed-variable
import * as test from 'blue-tape'
import test from 'blue-tape'
import {
FileBox,
......
......@@ -18,9 +18,9 @@
*/
import { EventEmitter } from 'events'
import * as normalize from 'normalize-package-data'
import * as readPkgUp from 'read-pkg-up'
import * as LRU from 'lru-cache'
import normalize from 'normalize-package-data'
import readPkgUp from 'read-pkg-up'
import LRU from 'lru-cache'
import {
FileBox,
......
......@@ -17,7 +17,7 @@
*
* @ignore
*/
// import * as util from 'util'
// import util from 'util'
import {
FileBox,
......
......@@ -19,10 +19,10 @@
*
*/
// tslint:disable:no-shadowed-variable
import * as test from 'blue-tape'
import * as sinon from 'sinon'
import test from 'blue-tape'
import sinon from 'sinon'
// import * as asyncHooks from 'async_hooks'
// import asyncHooks from 'async_hooks'
import {
Wechaty,
......
......@@ -17,9 +17,9 @@
*
* @ignore
*/
import * as cuid from 'cuid'
import * as os from 'os'
import * as semver from 'semver'
import cuid from 'cuid'
import os from 'os'
import semver from 'semver'
import {
// Constructor,
......
......@@ -19,8 +19,8 @@
*
*/
// tslint:disable:no-shadowed-variable
import * as test from 'blue-tape'
// import * as sinon from 'sinon'
import test from 'blue-tape'
// import sinon from 'sinon'
// const sinonTest = require('sinon-test')(sinon)
test('Electron smoke testing', async t => {
......
......@@ -19,8 +19,8 @@
*
*/
// tslint:disable:no-shadowed-variable
import * as test from 'blue-tape'
// import * as sinon from 'sinon'
import test from 'blue-tape'
// import sinon from 'sinon'
// const sinonTest = require('sinon-test')(sinon)
// import { log } from '../src/config'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册