keithamus / eslint-plugin-escompat

Report errors for code which wont work in browsers without transpiling
MIT License
36 stars 7 forks source link

fix: `no-regexp-s-flag` crash on non-string flags #2

Closed fisker closed 4 years ago

fisker commented 4 years ago

Second argument type is not checked. Cause eslint crash on Identifier

Only allow Literal and TemplateLiteral,

TemplateLiteral should not very offen to see, but not very hard to add this check, so I added it.

keithamus commented 4 years ago

🎉 Published as 2.1.3

https://github.com/keithamus/eslint-plugin-escompat/releases/tag/v2.1.3