quick-lint-js
quick-lint-js copied to clipboard
8$: Extra character `,` on end of useState() gives mediocre error message.
Doesn't tell me to remove extra character ,
on the end.
This should give an error saying unexpected token and missing semicolon like below:
I think we can implement this using the following logic: if const
is after ,
when parsing variable bindings (parser::parse_and_visit_let_bindings
in parse-statement-inl.h
), reporting a different error than E0024 (error_let_with_no_bindings
). I think E0036 is similar.
I would like to give this issue a shot.
I claim this for-hire task. I expect payment after I complete this task. I will email the quick-lint-js team if I am assigned this task.
I think we can implement this using the following logic: if
const
is after,
when parsing variable bindings (parser::parse_and_visit_let_bindings
inparse-statement-inl.h
), reporting a different error than E0024 (error_let_with_no_bindings
). I think E0036 is similar.
Hi, is this task closed or still available??? Thanks
@Moshahrani You can work on it if you want.
@Moshahrani You can work on it if you want.
Thanks!
@Moshahrani Did you make progress? Do you need any help?
I claim this for-hire task. I expect payment after I complete this task. I will email the quick-lint-js team if I am assigned this task.
I'm still working on this issue
Hey @strager I was not able to make progress on this issue, I will give up for now
Is this issue still opened by mistake?
I tried to simulate the bug in the QLJS playground:
The bug is still present. Here's a repro:
function useState() {}
const [a, setA] = useState(),
const [b, setB] = useState();