False positive on comma-dangle
with RestProperty
#276
Description
What version of TypeScript are you using?
2.3.2
What version of typescript-eslint-parser
are you using?
3.0.0
What code were you trying to parse?
Code is closed-source, but the gist is this:
const SomeComponent = withStyles(styles)(({
children,
...props
}) => {
What did you expect to happen?
No warning for missing comma at the ...props
line.
What happened?
warning Missing trailing comma comma-dangle
for the ...props
line.
Eslint recently disabled the trailing comma after the "RestProperty" but the parser likely generates "Property" node (based on my hacked-in logging from within the comma-dangle
rule).
This warning: https://github.com/eslint/eslint/blob/70367d1a48c8c71f9fbde05da4a7a626a59967fd/lib/rules/comma-dangle.js#L266
Here's the check for "RestProperty" which seems to fail because just "Property" is there instead:
https://github.com/eslint/eslint/blob/70367d1a48c8c71f9fbde05da4a7a626a59967fd/lib/rules/comma-dangle.js#L34-L40