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
{{ message }}
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
Difference in behavior during test mighration mentioned in comment
TypeScript code being linted
// should failnewRegExp('something \x1f something else');// creates regexp with special character in it (equivalent of /something � something else/)newRegExp('something \\x1f something else');// creates regexp with character match sequence in it (equivalent of /something \x1f something else/)newRegExp('something \\\x1f something else');// creates regexp that contains backslash followed by special character in it (equivalent of /something \� something else/)// should passnewRegExp('something \\\\x1f something else');// creates regexp that correctly escaped backslash followed by characters x,1,f (equivalent of /something \\x1f something else/)
with tslint.json configuration:
{
"rules": {
"no-control-regex": true
}
}
Actual behavior
Detected errors in strings with 1 and 3 \ characters (will also fail on 5 characters)
No errors in strings with 2 and 4 \ characters
Expected behavior
Should detect errors in strings with 1, 2, and 3 \ characters
No error in string with 4 \ characters
ESLint behavior (was prototype):
Will detect errors in strings with 1, 2, and 5 \ characters
Will detect no errors in strings with 3 and 4 \ characters.
Not sure why it passes on 3 \ characters, but it is up for discussion.
The text was updated successfully, but these errors were encountered:
TSLint is deprecated and no longer accepting pull requests other than security fixes. See #876. ☠️
We recommend you instead use typescript-eslint to lint your TypeScript code with ESLint. ✅
Bug Report
tslint-microsoft-contrib
version: 6.0.0Difference in behavior during test mighration mentioned in comment
TypeScript code being linted
with
tslint.json
configuration:Actual behavior
Detected errors in strings with 1 and 3
\
characters (will also fail on 5 characters)No errors in strings with 2 and 4
\
charactersExpected behavior
Should detect errors in strings with 1, 2, and 3
\
charactersNo error in string with 4
\
charactersESLint behavior (was prototype):
Will detect errors in strings with 1, 2, and 5
\
charactersWill detect no errors in strings with 3 and 4
\
characters.Not sure why it passes on 3
\
characters, but it is up for discussion.The text was updated successfully, but these errors were encountered: