-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Suggests that tsconfig.json is incorrect only when SyntaxError is caught #6160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems ok but in what case would this an error that is not related to syntax. What did your tsconfig look like?
Looks like a test is now failing
I've pasted in the error I've received - as you might see it's not related to the JSON syntax, but rather purely about misconfiguring TS.
Seems unrelated, I'll try rebasing. |
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
BUMP for stale bot |
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
) | ||
); | ||
} | ||
|
||
console.error(e && e.message ? `Details: ${e.message}` : ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop "Details: " from the start of the error message because it doesn't really make sense in the case of non-syntax error.
); | ||
} | ||
|
||
console.error(e && e.message ? `${e.message}` : ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to console.error()
again even if it's a SyntaxError
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. console.log
is probably fine here.
Otherwise I get i.e. such output;
Which is misleading - especially taking into account that info about incorrect JSON is written in bold