New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regular Expression finds #58287
Comments
I expect all of the errors not related to |
IMO, all of the "Octal escape sequences are not allowed" and "A decimal escape must refer to an existent capturing group" are probably indications of actual errors in user code. They're allowed in Annex B, but the user likely intended to use them as a backreference to a capture group and that's not how Annex B would treat them. All of the "A character class range must not be bounded by another character class" errors are probably fine and shouldn't be reported. Annex B allows them and most users wrote something like |
Ah, I did once mentioned this on my PR and thought it was fine since Ryan reacted on my comment. |
Yes, I actually thought that there is a consensus on not allowing any octal escapes anywhere per #53198 😅 |
Acknowledgement
Comment
Note: I eventually gave up on capturing "Not available unless target is ESXXXX" errors since they're not really interesting to look at
Via #58275
This character cannot be escaped in a regular expression.
Named capturing groups are only available when targeting 'ES2018' or later
/^((?<negative>-)|\+)?P((?<years>\d*)Y)?((?<months>\d*)M)?((?<weeks>\d*)W)?((?<days>\d*)D)?((?<time>T)((?<hours>\d*[.,]?\d{1,9})H)?((?<minutes>\d*[.,]?\d{1,9})M)?((?<seconds>\d*[.,]?\d{1,9})S)?)?$/
Named capturing groups are only available when targeting 'ES2018' or later.
Named capturing groups are only available when targeting 'ES2018' or later
This regular expression flag is only available when targeting 'es2018' or later
This character cannot be escaped in a regular expression
Named capturing groups are only available when targeting 'ES2018' or later
Octal escape sequences are not allowed. Use the syntax '\x04'
Named capturing groups are only available when targeting 'ES2018' or later
Named capturing groups are only available when targeting 'ES2018' or later
A character class range must not be bounded by another character class
Octal escape sequences are not allowed. Use the syntax '\x02'.
This character cannot be escaped in a regular expression.
Octal escape sequences are not allowed. Use the syntax '\x02'
A character class range must not be bounded by another character class
This regular expression flag is only available when targeting 'es2022' or later
This regular expression flag is only available when targeting 'es2018' or later
This regular expression flag is only available when targeting 'es6' or later
Octal escape sequences are not allowed. Use the syntax '\x00'
This regular expression flag is only available when targeting 'es2018' or later
A character class range must not be bounded by another character class
This character cannot be escaped in a regular expression
This regular expression flag is only available when targeting 'es6' or later
There is nothing available for repetition
'}' expected
/tag`foo *\${0x1 *\+ *0x1} *bar`;/
A character class range must not be bounded by another character class
A character class range must not be bounded by another character class.
A character class range must not be bounded by another character class
This character cannot be escaped in a regular expression.
This regular expression flag is only available when targeting 'es2022' or later.
Octal escape sequences are not allowed. Use the syntax '\x09'.
A character class range must not be bounded by another character class.
A character class range must not be bounded by another character class.
Named capturing groups are only available when targeting 'ES2018' or later
A character class range must not be bounded by another character class.
This character cannot be escaped in a regular expression
A character class range must not be bounded by another character class
A character class range must not be bounded by another character class
dozens of these in this file, see #58275 (comment)
A decimal escape must refer to an existent capturing group. There are only 1 capturing groups in this regular expression
/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/
A character class range must not be bounded by another character class
Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set
A character class range must not be bounded by another character class
The text was updated successfully, but these errors were encountered: