mysticatea / eslint4b

ESLint which works in browsers.
MIT License
37 stars 19 forks source link

SyntaxError: invalid regular expression flag s in Firefox 70.0.1 (64-bit) #4

Closed dmnsgn closed 4 years ago

dmnsgn commented 4 years ago

Error occurs in version 6.6.0. Works fine for 6.2.2.

Possibly related: https://bugzilla.mozilla.org/show_bug.cgi?id=1579867

mysticatea commented 4 years ago

Use Babel or another transpiling tool.

Firefox has not supported the s flag of es2018 for some reason. Node.js has supported it since 8.10.0.

https://caniuse.com/#feat=mdn-javascript_builtins_regexp_dotall

sjoerdmulder commented 4 years ago

@mysticatea Hitting the same issue and I am using Babel but since eslint4b is a dependency of my project it somehow isn't transformed.

To improve compatibility with browsers (4b :smile: ) could you try building / releasing the module including the @babel/plugin-transform-dotall-regex and see if it works in firefox then?

sjoerdmulder commented 4 years ago

FYI version 6.5.1 works and since 6.6.0 it doesn't anymore in Firefox

seanparsons commented 4 years ago

I'm also hitting this issue, as our project is built with webpack we can't just use babel to post-process the bundle as easily.