-
Notifications
You must be signed in to change notification settings - Fork 157
Don't require ts-jest and typescript if you're not using typescript #302
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
Conversation
The resulting boolean is already validated at https://github.com/vuejs/vue-jest/blob/next/lib/process.js#L103
Thanks! Seems the linter is failing - can you I can release this once it's passing and merged up. |
@lmiller1990 running |
Seems that fixed the issue as well |
Thanks, one last question any reason to do |
@lmiller1990 yeah we want the user to explicitly disable typescript. So this only works when that value is false, not when it is, for example, omitted |
I think I am confused here. Isn't the current problem that TS is required even when the user isn't using TS in their project? I don't think the user should have to opt out - if they are not using TS (eg, no tsconfig present) then that should be enough to know they are not using TS. I don't think this has anything to do with the vue-jest config at all - we should check if there is a Or maybe I've misunderstood something about the problem and/or proposed solution? |
@lmiller1990 agree, but I'm just looking at the docs which say to explicitly disable typescript because tsConfig's default is true: https://github.com/vuejs/vue-jest#boolean-1 |
Interesting that seems like a kind of bad default. I think we should do what makes sense, I doubt most people would think to look for this kind of config option. What do you think? Are you interested in implementing the above (check for a ts-config, if there isn't one, do not use TS)? |
Sorry, don't have the time or package knowledge to think about how this should work properly. For now I am already helped if this PR can be merged and released, so that I (and others) can use this without TS at least. You should create a new issue for this, so that a new PR can be submitted. |
All good, I will add a commit to this PR! Thanks for your help 👍 |
@lmiller1990 can we get this out in the meanwhile? |
What do you think about this solution instead? #307 |
Closed in favor of #307 |
The resulting boolean is already validated at https://github.com/vuejs/vue-jest/blob/next/lib/process.js#L103