this is definitely one thing that california's got right.
"Non-compete agreements are automatically void as a matter of law in California, except for a small set of specific situations expressly authorized by statute. They were outlawed by the original California Civil Code in 1872."