-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
TSServer: config file diagnostics are missing start / end property #10384
Comments
We use a regular JSON parser to read this file so we don't actually know where the property came from. Maybe someone can find / write a span-preserving JSON parser (I've looked but haven't found one) so we can report better errors. |
@RyanCavanaugh: makes the feature not very useful when used inside editors since we would need to fold all errors onto the file without being able to provide error indications. In addition it violates the tsserver protocol spec which states that start/end are mandatory on a Diagnostic object. Could this be upgraded to a bug and consider for 2.0. Being able to show errors on tsconfig files is a long wanted feature. We maintain a json parser here: https://github.com/Microsoft/node-jsonc-parser. Even supports comments. |
Related work happening in #10418 |
@@mhegazy We've enabled config file diagnostics in VSCode but had to resort to a pretty ugly workaround to try to map the error to a specific location. Having proper location data on the config diagnostic responses would fix a number of edge cases and errors that I'm currently seeing |
This is fixed right?
|
Yes, I confirmed that this is working properly now. I'll make sure we consume these ranges properly on the VS Code side Thanks! |
TypeScript Version: 2.0
Code
tsconfig.json
The text was updated successfully, but these errors were encountered: