-
Notifications
You must be signed in to change notification settings - Fork 642
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow trailing comma after rest param in component declaration
Summary: There is no reason why we don't want to allow that, other than keeping consistent with the behavior of parsing function rest params. We can't change the JS spec for function rest params, but we can for component syntax to make it more permissive. Prettier will still remove the trailing comma if we still care about the consistency of checked-in code, but it will at least make the experience of manually convert function component to component syntax slightly easier. Changelog: [parser] Trailing comma is now allowed after rest parameter in component syntax. Reviewed By: alexmckenley Differential Revision: D63488906 fbshipit-source-id: d3afbdd5163de46ef11caf0824c45261af8c7482
- Loading branch information
1 parent
df839b7
commit f5ca193
Showing
3 changed files
with
99 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters