The obvious solution produces an exit code of 1:
bash$ rm -rf .*
rm: cannot remove directory `.'
rm: cannot remove directory `..'
bash$ echo $?
1
One possible solution will skip the "." and ".." directories but will only delete files whose names are longer than 3 characters:
bash$ rm -f .??*