quick-lint-js

Find bugs in JavaScript programs.

E0211: missing parentheses around self-invoked function

Invoking an arrow function immediately without parentheses is a syntax error. For example:

() => {
  console.log('hi');
}()

To fix this error, add parentheses around the entire function definition, before the invocation:

(() => {
  console.log('hi');
})()

Documentation for other errors