Gatsby: Unexpected use of confirm

The problem is that confirm is believed to be a confusing-browser-globals.

The quick solution is to insert window before confirm:

window.confirm(...
Doubts? Feel free to leave a comment!