You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That said, I'm not sure we should fix this until we do a major release. Babel actually the same issue at one point and they fixed it, but they had to revert it almost immediately afterwards due to a lot of ecosystem breakage.
Still, I thought I'd make a tracking issue for it since it's incorrect behavior.
The text was updated successfully, but these errors were encountered:
👍 breaking mostly due to react-native and the fact that it compiles node_modules so users themselves didn't have to have trailing commas in their own codebase for the error to happen
The comma which is causing a problem here is a trailing comma after
a rest, within a function argument's parameter destructuring:
function a({
a = false,
...b,
}) {
// ...
}
This was previously allowed with `experimentalObjectRestSpread` enabled
but now throws an error with eslint/js#310.
I'll be removing the comma as well as it's clearly a point of contention
but this will allow the old docs to get deployed.
Expected behavior: SyntaxError
Actual behavior: Successful parse
ESLint has received a large number of invalid
comma-dangle
bug reports indirectly caused by confusion from this bug. eslint/eslint#7422, eslint/eslint#7463, eslint/eslint#7502, eslint/eslint#7614, eslint/eslint#7857, eslint/eslint#8273, eslint/eslint#8289.That said, I'm not sure we should fix this until we do a major release. Babel actually the same issue at one point and they fixed it, but they had to revert it almost immediately afterwards due to a lot of ecosystem breakage.
Still, I thought I'd make a tracking issue for it since it's incorrect behavior.
The text was updated successfully, but these errors were encountered: