Combined with the power of the Atom, someone created linter-shellcheck, a linter for bash scripts that helps you spot those minor mistakes that end up costing a huge amount of time when writing for Vagrant deployment.
First, install shellcheck. On the Mac, I used the following:
brew install shellcheck
Then, install Atom and the linter-shellcheck plugin.
Welcome to XXI century bash programming.