Karabiner Modifications
This modification stops Safari from quitting when you accidentally press cmd+q. To quit Safari press and hold cmd+q. This is similar to the optional setting in chrome.
Install Karabiner Elements In the menubar click Karabiner icon and click preferences.
Go to 'Misc' tab and click Open Karabiner folder (usually at ~/.config/karabiner) copy and paste the json file to Assets -> complex_modifications.
And you can now enable the modification.