-
Notifications
You must be signed in to change notification settings - Fork 889
dynamic import cannot have trailing comma #4494
Comments
If it fails to compile in TS 3.3, then adding the same exact check in TSLint feels redundant. Why report it twice? I'm going to mark this as declined for now but open to community feedback. |
Fair enough. What about |
Yeah autofixing is a fair argument but IMO the benefits don't outweigh the maintenance costs in this one, especially given that it's a formatting rule, a category which we are de-prioritizing in TSLint as a whole (#3592) |
actually, I looked at the trailing-comma rule implementation again and this shouldn't be too hard to add. open to PRs with unit tests |
💀 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! 👋 |
Bug Report
TypeScript code being linted
with
tslint.json
configuration:Actual behavior
No error.
Expected behavior
Trailing commas are invalid in
import()
statements as they are not a function call but a syntactic construct. TypeScript v3.3+ does not compile with a trailing comma in an import statement. See this PR. This should be an error in tslint, too.The text was updated successfully, but these errors were encountered: