"extends": "eslint:recommended" property in a configuration file enables this rule.
Octal literals are numerals that begin with a leading zero, such as:
var num = 071; // 57
The rule disallows octal literals.
If ESLint parses code in strict mode, the parser (instead of this rule) reports the error.
Examples of incorrect code for this rule:
/*eslint no-octal: "error"*/ var num = 071; var result = 5 + 07;
Examples of correct code for this rule:
/*eslint no-octal: "error"*/ var num = "071";
This rule was introduced in ESLint 0.0.6.
© JS Foundation and other contributors
Licensed under the MIT License.