quick-lint-js

Find bugs in JavaScript programs.

E0017: if statement needs parentheses around condition

In JavaScript, if statements require parentheses around the condition. It is an error to omit the parentheses:

if 2 + 2 == 4 {
  console.log("Math works!");
}

To fix this error, add ( and ):

if (2 + 2 == 4) {
  console.log("Math works!");
}

Introduced in quick-lint-js version 0.2.0.

Documentation for other errors