It's been reaffirmed many, many times that states are allowed to do essentially whatever they please when it comes to how they run their own election, outside of discriminating against protected classes. Even if it were to get shot down, they could pass a law simply disallowing their electors from voting for Trump.