✅ This rule is included in the ts javascript presets.
Legacy octal numeric literals (e.g., 077, 0123) are a deprecated feature in JavaScript that can lead to confusion and errors.
They are forbidden in strict mode and are less readable than their modern alternatives.
The explicit octal syntax 0o (e.g., 0o77) introduced in ES6 is clearer and works in both strict and non-strict modes.
The digit 0 by itself is allowed as it represents zero, not an octal literal.
This rule reports on numeric literals with a preceding 0.
If you need to maintain compatibility with very old JavaScript engines that don’t support the explicit octal syntax (ES6+), you might choose to disable this rule.
However, this is extremely rare in modern development, as ES6 has been widely supported since 2015.