You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeScript currently only forbids octal literals in strict mode. But it allows octal escapes in string literals even in strict mode. And it allows octal escapes in template strings (always forbidden).
That is tracked by microsoft/TypeScript#396
The new rule should forbid all octal literals and escape sequences regardless of strict mode.
The autofixer should convert them to unicode escapes.
Note that this rule should only forbid the legacy octal literal syntax 010 while allowing and even fixing to the newer octal syntax 0o10 introduced in ES2015.
octal literals are actually handled quite good in the compiler. so this is only about octal escape sequences. additionally they should be fixed to hex escape sequences to avoid useless bloat in the code.
ES5 deprecated octal literals (
010
) and octal escape sequences ('\41'
). https://mathiasbynens.be/notes/javascript-escapes#octalTypeScript currently only forbids octal literals in strict mode. But it allows octal escapes in string literals even in strict mode. And it allows octal escapes in template strings (always forbidden).
That is tracked by microsoft/TypeScript#396
The new rule should forbid all octal literals and escape sequences regardless of strict mode.
The autofixer should convert them to unicode escapes.
This rule is similar to #203
The text was updated successfully, but these errors were encountered: