-
Notifications
You must be signed in to change notification settings - Fork 889
Suggestion: Use typescript to parse JSON config file #3182
Comments
An update on this: I'll open an issue in the typescript repo to ask if this is intended. |
microsoft/TypeScript#19552 landed in TypeScript. The fix will be released with version 2.7.0 |
💀 It's time! 💀TSLint is being deprecated and no longer accepting pull requests for major new changes or features. See #4534. 😱 If you'd like to see this change implemented, you have two choices:
👋 It was a pleasure open sourcing with you! If you believe this message was posted here in error, please comment so we can re-open the issue! |
🤖 Beep boop! 👉 TSLint is deprecated 👈 (#4534) and you should switch to typescript-eslint! 🤖 🔒 This issue is being locked to prevent further unnecessary discussions. Thank you! 👋 |
TypeScript@2.5 uses its own parser to parse tsconfig.json files. We could use
ts.readConfigFile
orts.parseConfigFileTextToJson
for tslint.json files as well.This API allows comments and trailing commas (and even tolerates single quotes, but returns an error for each single quoted string). It can also be used for better error reporting as it contains way more details than exceptions thrown by
JSON.parse
.Before v2.5 the function only accepts comments, but that's probably OK as a fallback because that's also what the current implementation of tslint does.
Related: #1721
The text was updated successfully, but these errors were encountered: