Echoing aliases into a .bashrc file

Surround the content of echo with double quotes. To get a newline before the new alias, use echo -e and insert a newline \n:

echo -e "\nalias cdear='cd | clear'" >> .bashrc