amilajack / eslint-plugin-compat

Check the browser compatibility of your code
MIT License
3.07k stars 104 forks source link

[QUESTION] Detect `showModal` method from `dialog` element #616

Open KirianCaumes opened 4 months ago

KirianCaumes commented 4 months ago

Hi, Currently, if I write the following code, the showModal method is not detected as a problem:

const dialog = document.createElement('dialog')
dialog.showModal()

With this .browserslistrc configuration:

last 10 ie versions

But according to caniuse.com, it is indeed not compatible: https://caniuse.com/mdn-api_htmldialogelement_showmodal

Is this a bug or something that is not currently in place in the library? Is it even possible to detect? In any case, thank you for this awesome librairie 😁