Longer term, we should do away with shell scripts (T348479) to facilitate readability and testing.
In the meantime, having shellcheck for linting and helping avoid mistakes is a good idea, and using shfmt to provide consistent formatting across individuals on the team is also useful.