There is no difference in JavaScript between, for example, 1
, 1.0
and 1.
, so prefer the former for consistency.
This rule is fixable.
const foo = 1.0;
const foo = -1.0;
const foo = 123_456.000_000;
const foo = 1.;
const foo = 123.111000000;
const foo = 123.00e20;
const foo = 1;
const foo = -1;
const foo = 123456;
const foo = 1.1;
const foo = -1.1;
const foo = 123.456;
const foo = 1e3;