no-nonoctal-decimal-escape
Configuration
rslint.config.ts
Rule Details
Disallows \8 and \9 escape sequences in string literals.
Although "\8" and "\9" evaluate to the same characters as "8" and "9", they are non-octal decimal escape sequences kept only for backward compatibility with web JavaScript. Browsers must support them, but Annex B explicitly allows non-web environments to omit them. The recommended fix is to drop the leading backslash, switch the digit to its \uXXXX form, or — when the goal really is to include a backslash — escape the backslash itself.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Options
This rule has no options.