Skip to content

Use of RegExp.escape() not flagged with browserlist-config-wikimedia's ~last-3-years config #668

@bvibber

Description

@bvibber

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions