no-octal
Configuration
rslint.config.ts
Rule Details
Disallows octal literals — integer numerals whose source form starts with a leading
zero followed by another digit (e.g. 071, 00, 08). Octal numeric literals were
deprecated in ECMAScript 5 and are forbidden in strict mode; the leading-zero notation
has also been a long-standing source of confusion (08 is decimal 8, but 017 is
decimal 15). Prefer the explicit 0o... octal notation introduced in ES2015.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Options
This rule has no options.