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

Patch parse tsconfig #75

Merged
merged 2 commits into from
Feb 21, 2018
Merged

Patch parse tsconfig #75

merged 2 commits into from
Feb 21, 2018

Conversation

eps1lon
Copy link
Contributor

@eps1lon eps1lon commented Feb 21, 2018

Currently the default tsconfig.json from tsc --init includes various comment styles. Those are allowed by Typescript because they use their own json parser. However those configs throw with withCustomConfig because of the usage of the native JSON.parse.

This pull requests fixes this behavior by using the same function to parse tsconfig that Typescript uses.

- includes tsconfig from tsc --init
- typescript uses a custom json parser that allows comments
- fixes errors with commented tsconfigs that are perfectly fine
  with typescript but throw with own withCustomConfig
@eps1lon
Copy link
Contributor Author

eps1lon commented Feb 21, 2018

CI fails are unrelated because travis uses npm instead of yarn. This way it installs the dependencies according to the semver ranges instead of the lock file. typescript@^2.6.2 matches typescript@2.7.1 which has different declarations.

Either lock to typescript@~2.6.2 or remove the install property in travis.yml which will result in travis using yarn (see https://blog.travis-ci.com/2016-11-21-travis-ci-now-supports-yarn).

@pvasek pvasek merged commit f9b0805 into styleguidist:master Feb 21, 2018
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.

2 participants