eslint-plugin-compat
eslint-plugin-compat copied to clipboard
Use of RegExp.escape() not flagged with browserlist-config-wikimedia's ~last-3-years config
For MediaWiki and extensions we're using a browserlist for driving eslint-plugin-compat from browserlist-config-wikimedia, which for full compat mode lists:
[
"Chrome > 0, Edge > 0, Firefox > 0 and last 3 years",
"Safari >= 11.1",
"iOS >= 11.3",
"Android >= 5"
]
This should absolutely reject Regexp.escape() which is brand new in 2025:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/escape
however it does not. It's passed through as ok, and ends up on old browsers as calling null.