noOctalEscape
此内容尚不支持你的语言。
Diagnostic Category: lint/nursery/noOctalEscape
Since: v1.9.3
Sources:
- Same as:
no-octal-escape
Disallow octal escape sequences in string literals
As of the ECMAScript 5 specification, octal escape sequences in string literals are deprecated and should not be used. Unicode escape sequences should be used instead.
Examples
Section titled ExamplesInvalid
Section titled Invalidcode-block.js:1:11 lint/nursery/noOctalEscape ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Don’t use octal
> 1 │ var foo = “Copyright \251”;
│ ^^^^^^^^^^^^^^^^
2 │
ℹ Don’t use octal escape sequences: “Copyright \251”
ℹ Use unicode or hexidecimal escape sequences instead.