How to increase notification message display time?


I want to increase the notification message display time on detail page like “You need to choose options for your item.”. Please let me know how to do that.


As you can see in my article How is a message hidden on the frontend checkout screen?, the display time is 5 seconds and it is hardcoded.
You can increase it there.
I usually remove the whole isHidden code branch from my development environment:

can you please let me know how to override messages.js file in my custom theme?