"If you espouse views I don't like on your personal Twitter, you can't contribute to this entirely unrelated software project."
So rules you don't agree with?
The joy of a free (as in not being arrested) society is that if you don't like those rules you are free not to join. Or free to moan about them repeatedly until everyone dogpiles on them to change the rules, or not.
Either way, they are allowed to make rules how they like. Just as you are allowed to not like those rules, and talk about it incessantly.
As I said, CoCs are just rules, some of which _you_ don't like
If that individual's viewpoints somehow visibly leak into their work or professional communications, then you might have a case for complaint or concern.
Furthermore, by codifying and enforcing whatever your personal viewpoints are in a code of conduct, you've summarily decided for everyone else as well.
Also not sure what code of conduct you have in mind, but most specify that you should treat others with respect regardless of <list of protected characteristics>. That's not a viewpoint, that's a necessary condition for collaboration. If you feel an uncontrollable hate towards people of some nationalities or gender identities, it would be wise too keep it a private matter indeed, and not make this hate known to everyone
"Treat with respect" is a dog whistle - easily coopted for whatever nefarious reason.
"If you do not agree with me, you will not participate in any space where I can drum up enough sympathy (headache) to have you excluded from."
They are something else hijacking the legitimacy of normal justified functional articulable rules.