Suggests that tsconfig.json is incorrect only when SyntaxError is caught#6160
Suggests that tsconfig.json is incorrect only when SyntaxError is caught#6160iansu merged 3 commits intofacebook:masterfrom
Conversation
jenbuzz
left a comment
There was a problem hiding this comment.
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.
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.
Do we want to console.error() again even if it's a SyntaxError?
There was a problem hiding this comment.
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