Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable esModuleInterop #183

Merged
merged 2 commits into from
Jul 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* limitations under the License.
*/
import * as path from 'path';
import meow from 'meow';
import updateNotifier from 'update-notifier';
import * as meow from 'meow';
import * as updateNotifier from 'update-notifier';
import {init} from './init';
import {clean} from './clean';

Expand Down
4 changes: 2 additions & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import * as fs from 'fs';
import * as path from 'path';
import pify from 'pify';
import rimraf from 'rimraf';
import * as pify from 'pify';
import * as rimraf from 'rimraf';

export const readFilep = pify(fs.readFile);
export const rimrafp = pify(rimraf);
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

import {test, Test} from 'ava';
import * as fs from 'fs';
import makeDir from 'make-dir';
import * as makeDir from 'make-dir';
import * as path from 'path';
import pify from 'pify';
import * as pify from 'pify';
import * as tmp from 'tmp';

const writeFilep = pify(fs.writeFile);
Expand Down
2 changes: 1 addition & 1 deletion test/test-format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import test from 'ava';
import fs from 'fs';
import * as fs from 'fs';
import * as path from 'path';

import {Options} from '../src/cli';
Expand Down
2 changes: 1 addition & 1 deletion test/test-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import test from 'ava';
import path from 'path';
import * as path from 'path';

import {Options} from '../src/cli';
import * as init from '../src/init';
Expand Down
4 changes: 2 additions & 2 deletions test/test-kitchen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import * as cp from 'child_process';
import * as fs from 'fs';
import * as ncp from 'ncp';
import * as path from 'path';
import pify from 'pify';
import rimraf from 'rimraf';
import * as pify from 'pify';
import * as rimraf from 'rimraf';
import * as tmp from 'tmp';

interface ExecResult {
Expand Down
2 changes: 1 addition & 1 deletion test/test-lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import test from 'ava';
import fs from 'fs';
import * as fs from 'fs';
import * as path from 'path';

import {Options} from '../src/cli';
Expand Down
1 change: 0 additions & 1 deletion tsconfig-google.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"declaration": true,
"esModuleInterop": true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to disable synthetic default imports as well? Or am I getting my compiler flag wires crossed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.. esModuleInterop implicitly enables synthetic imports. See here: https://www.typescriptlang.org/docs/handbook/compiler-options.html

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D'oh.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"forceConsistentCasingInFileNames": true,
"lib": ["es2016"],
"module": "commonjs",
Expand Down