quick-lint-js

Find bugs in JavaScript programs.

E0028: number literal contains consecutive underscores

Number literals can contain underscores (_) to separate digits for legibility. At most one _ can be used between a pair of digits:

let PIN_LED = 0b0__1;
const tau = 3.14159____26536 * 2;

To fix this error, remove extraneous underscores:

let PIN_LED = 0b0_1;
const tau = 3.14159_26536 * 2;

Introduced in quick-lint-js version 0.2.0.

Documentation for other errors