I call this the unofficial bash strict mode. This causes bash to behave in a way that makes many classes of subtle bugs impossible. You’ll spend much less time debugging, and also avoid having unexpected complications in production.
Source: Use the Unofficial Bash Strict Mode (Unless You Looove Debugging) (aaron maxwell)