A number literal starts with 0 and another digit, which reads as octal

tx0/ts:legacy-octal-numberrecommendedwarningsmell

What it finds

017 is fifteen, not seventeen: a number literal with a leading zero and only octal digits is read as octal in sloppy scripts, and is a syntax error in strict code and modules. 0o17 says octal explicitly, and 17 says decimal.

Reported are number literals that start with 0 followed by another digit, such as 017 or 08. For those made of octal digits only the fix, which is safe, writes the same value as 0o17; 08 and 09 are decimal despite the zero and have no fix.

From the rule's source, legacy_octal_number.rs.

Turn it on, off or suppress it

The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/ts:legacy-octal-number" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/ts:legacy-octal-number] reason="..."

tx0 explain tx0/ts:legacy-octal-number shows the same in the terminal. Found a false positive? Report it.