Tabs and spaces at the end of a line of Code is unnecessary and sometimes bad. It makes no sense. At least i don’t know a single programming language where it is a good thing. Code is love and a file with trailing whitespace is a love letter written with a dripping fountain pen.

I can not understand why a lot of code editors and IDE‘s do not remove it on save by default. But in the most of them you can turn that on.

In Sublime it is a simple "trim_trailing_white_space_on_save": true, in your settings file (open it per +,).

In Eclipse (a lot of my workmates use it) it is a bit more difficult.