quick-lint-js

Find bugs in JavaScript programs.

E0709: expected variable name after '...'

The spread operator ('...') must precede a variable name.

const numbers = () => { return [1, 2, 3, 4] };
const [numberOne, numberTwo, ...] = numbers();

To fix this mistake, place the identifier after '...':

const numbers = () => { return [1, 2, 3, 4] };
const [numberOne, numberTwo, ...rest] = numbers();

Documentation for other errors