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
classEscape SyntaxError #98
Comments
The regex in question is: That |
Firefox does this:
|
Why that doesn't look correct, With the |
See the above link that throws on a native regular expression. |
This is breaking Workaround for yarn users: {
"resolutions": {
"regjsparser": "0.6.0"
}
} |
Looking at this and will keep you posted. |
Reduction: regjsparser.parse('[\\-/]', '') // Works (1)
regjsparser.parse('[\\-/]', 'u') // Fails (2) Also note, that // Executed in Firefox 71
r = new RegExp('[\\-/]')
r.exec('\\') // -> null
r.exec('-') // -> Array ['-']
r.exec('/') // -> Array ['/'] Note that the parsing of From this, it seems the problem is when using the 'u' flag for parsing the string. |
@chriseppstein , I am about to board my NYC -> ZHR bound plane and cannot commit to have a fix done soon. In case this is time critical, can you maybe do a workaround in the meantime by avoid using the "u" flag? |
@jviereck Thank you for looking into this. It's a transitive dependency of |
Thanks to the quick PR from @JLHwung this was fixed in #99. RegExp provided as error case in the first issue is parsing now upstream: http://www.julianviereck.de/regjsparser/#%2F%28%5Ba-zA-Z0-9%5C-%2F%5D%2B%29%2Fug A new v0.6.2 was drafted and pushed to NPM: https://www.npmjs.com/package/regjsparser/v/0.6.2 |
@chriseppstein @mdjermanovic please let us know in case there are still problems on this one! On a personal note, it's useful for me to know what's the impact of a reported bug is to give it the proper priorities. Reading that this breaks Ember applications made this a P0 for me. |
@jviereck As a side note, astexplorer.net has supported |
ref eslint/eslint#12660
The text was updated successfully, but these errors were encountered: