Skip to content

Properly parse config, read config from tsconfig.json, set default lib to "es2017" #20

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

Merged
merged 4 commits into from
Mar 29, 2019

Conversation

BendingBender
Copy link
Collaborator

@BendingBender BendingBender commented Mar 24, 2019

This PR fixes following issues:

  • Config from package.json was expected to be in the internal TS compiler format (Config type) contrary to the format that is used in tsconfig.json. The config from package.json will now be properly parsed.
  • 'es2017' lib is now set explicitly which overrides TS default of ['dom', 'es6', 'dom.iterable', 'scripthost']. This should flag usages of DOM types without an explicitly specified triple-slash-import (fixes Catch missing lib imports #7).
  • moduleKind: 'commonjs' is now set by default to support import foo = require('foo') syntax in test files
  • If a tsconfig.json file is found it is now used as a config source.
  • Remove the skipLibCheck: true compiler option. This option disables type-checks in *.d.ts files which is the main purpose of this package.

@BendingBender BendingBender force-pushed the properly-parse-config branch from a92cfa6 to 90ec133 Compare March 24, 2019 02:01
@BendingBender BendingBender force-pushed the properly-parse-config branch from 90ec133 to 60d93ea Compare March 24, 2019 02:09
Copy link
Collaborator

@SamVerschueren SamVerschueren left a comment

Choose a reason for hiding this comment

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

Some quality work @BendingBender! Thanks 🎉

@SamVerschueren SamVerschueren merged commit b3e03de into tsdjs:master Mar 29, 2019
@BendingBender BendingBender deleted the properly-parse-config branch March 29, 2019 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Catch missing lib imports
3 participants