quick-lint-js

Find bugs in JavaScript programs.

E0088: while loop is missing '(' or ')' around condition

while loops have a condition after the while keyword. It is a syntax error to write a condition without either ( or ):

let name = '';
while (name === '' {
  name = prompt('What is your name?');
}

To fix this error, write ( before the condition or ) after the condition:

let name = '';
while (name === '') {
  name = prompt('What is your name?');
}

Introduced in quick-lint-js version 0.2.0.

Documentation for other errors