Open Zhouqchao opened 1 year ago
I was literally about to install this plugin to lint for this use case. This is a bummer
For a basic workaround (that unfortunately doesn't take Browserslist settings into account):
rules: {
"no-restricted-syntax": [
"error",
{
selector: "Literal[regex][raw=/\\(\\?<[=!]/]",
message:
"Lookbehind assertions are not supported in some browsers (e.g. Safari 16.3).",
},
],
},
lookbehind
in regular expresions should report an error because it is not supported on Safari browser.here is my browserslist config:
and here is my eslint config:
I do get an error for OffscreenCanvas not being supported on Safari 14, so it looks like I have set up the plugin correctly.