I'm playing with babel-cli. I installed the ES2015 extension and it works well. For example, the following snippet:
let square = x => x * x;
...is converted into:
"use strict";
var square = function square(x) {
return x * x;
};
However I have trouble when using octal numbers. For example:
let mode = 0777;
throws me an error:
SyntaxError: index.js: Invalid number (1:11)
> 1 | let mode = 0777;
| ^
2 |
It looks like it doesn't like the numbers starting with 0 (octal numbers). How can I solve this?
In fact, such numbers appear not in my code but in one of the dependencies.
Is it a babel bug or a feature? What is the workaround/solution?