-
Notifications
You must be signed in to change notification settings - Fork 100
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
Change notice behavior for trailing-comma esSpecCompliant #323
Change notice behavior for trailing-comma esSpecCompliant #323
Conversation
eslint only supports esSpecCompliant true.
👋 @MatthiasKunnen, thanks for reporting the issue and opening a PR! I'm a little confused. TSLint's
...but ESLint's Per the PR template, would you mind filing an issue to discuss the changes? In general it'd be preferable to discuss whether changes should happen in issues, and save PRs for just the implementation changes. |
Only warn when esSpecCompliant is specifically set to false and assume true since it's the desired behavior.
You're absolutely correct about both implementations. Both TSLint and ESLint implemented their respective rules in a way that did not deal with rest params. Both changed their rules to deal with rest params but they went separate directions. TSLint decided that old versions of typescript should not be broken as they allowed the trailing comma so they added an option. ESLint, however, decided since a trailing comma after a rest param is a syntax error, a breaking change was okay and they since disallow a comma after a rest param (discussion here eslint/eslint#7297). TSLint actually had a discussion about removing the
We can thus assume that I hope that this explanation is clear as to the purpose of the PR and the underlying reasons. If not I can make an issue. |
Yes please! |
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.
Excellent. Thanks so much for persevering through my lack of understanding! 💪
PR Checklist
status: accepting prs
Overview
I've changed the notice behavior of
esSpecCompliant
property for rule trailing-comma. Previously, a notice would be given when theesSpecCompliant
was present. Since eslint only supportsesSpecCompliant == true
no notice should be given in that instance.After this change, a notice will be given when
esSpecCompliant
is eitherundefined
orfalse
.