This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#412 Fixing an edge case in the no-octal-literal rule where numbers p…
…receeded by an escaped backslash would fail the rule. Fixing an issue where the no-octal-rule wouldn't handle template strings or newlines inside strings. Fixing test numbering. Fixing duplicate variable declaration.
- Loading branch information
Showing
3 changed files
with
214 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 14 additions & 2 deletions
16
test-data/NoOctalLiteral/NoOctalLiteralTestInput-passing.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,16 @@ | ||
function demoScriptPass1() { | ||
var x = "Sample text \xB2"; | ||
var y = "Sample text \0111"; // longer than octal | ||
var w1 = "Sample text \xB2"; | ||
var x1 = "Sample text \0111"; // longer than octal | ||
var y1 = "Sample text \\1"; | ||
var z1 = "Sample text \\\\1"; | ||
|
||
var w2 = 'Sample text \xB2'; | ||
var x2 = 'Sample text \0111'; // longer than octal | ||
var y2 = 'Sample text \\1'; | ||
var z2 = 'Sample text \\\\1'; | ||
|
||
var w3 = `Sample text \xB2`; | ||
var x3 = `Sample text \0111`; // longer than octal | ||
var y3 = `Sample text \\1`; | ||
var z3 = `Sample text \\\\1`; | ||
}; |