I actually make this error pretty frequently.
The problem is the pronunciation. "I didn't use to" and "used to" will sound almost identical, so when you type quickly what you "hear" in your head, it happens.
Remember that when you have a conjugated form of "to do" (she did, he didn't, it does, etc.), the other verb will always be in the main form (use).