Delete Whitelines
Delete Whitelines is an Atom package for removing empty lines.

Just Select the text, use command palette (cmd + shift + P) > delete-whitelines:toggle or alt+shift+D (for MAC & windows) to remove empty lines within the selected text area.
-Dhawal M