-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
trailingComma option is not applied after spread in object #1079
Comments
A trailing comma isn't allowed after the rest operator.
(It's currently parsed by Babel v6, but only for back-compat reasons. Babel v7 will be spec compliant and disallow it) |
Nice, thanks for the info! |
How about typescript? tslint reports it as an error and I have to use a line ignore comment |
@thgreasi can you open an issue on tslint so that they can fix it? |
Opened palantir/tslint#3147 for this. |
I'd expect a comma after
...bar
whentrailingComma
flag is set, no?https://prettier.github.io/prettier/#%7B%22content%22%3A%22const%20%7B%5Cn%20%20foo%2C%5Cn%20%20baz%2C%5Cn%20%20...bar%5Cn%7D%20%3D%20this.props%22%2C%22options%22%3A%7B%22printWidth%22%3A80%2C%22tabWidth%22%3A2%2C%22singleQuote%22%3Afalse%2C%22trailingComma%22%3A%22all%22%2C%22bracketSpacing%22%3Atrue%2C%22jsxBracketSameLine%22%3Afalse%2C%22parser%22%3A%22babylon%22%2C%22doc%22%3Afalse%7D%7D
The text was updated successfully, but these errors were encountered: