quick-lint-js

Find bugs in JavaScript programs.

quick-lint-js found inconsistencies in the error documentation. If you're hacking on the website, rebuild quick-lint-js for the website by following wasm/README.md and website/README.md.

/__w/quick-lint-js/quick-lint-js/docs/errors/E0720.md: error: expected only E0720 errors in first code block but found E0057 /__w/quick-lint-js/quick-lint-js/docs/errors/E0720.md: error: expected only E0720 errors in first code block but found E0059

E0720: function 'let' call may be confused for destructuring; remove parentheses to declare a variable

In JavaScript, variables can be named let and interpreted as a function call if it is followed by parentheses. This code calls function let instead of destructuring an object:

const words = {first: "hello", second: "world"};
let ({first} = words);

If you want to declare a variable, remove the parentheses:

const words = {first: "hello", second: "world"};
let {first} = words;

Documentation for other errors