The Spanish civil war is a fascinating topic and I can't do justice to it in the small space of an HN comment. Many Americans were sympathetic to the republic against fascism. It's not surprising that Chomsky could have that as such a foundational piece of his left wing politics.
As a Spaniard myself it is shocking how many people believe the propaganda of being "Republic" vs fascism. If you consider Franco fascist because they were supported by Hitler, you should consider the other side communist for being supported by Stalin.
Because that is exactly what the "Republic" wanted in Spain, the dictatorship of the proletarian.
As I said there is too much to summarize here. The Republicans, communists, and anarchists were very divided within themselves and their "goodness" varied a lot from person to person, group to group. Certainly that coalition was flawed. These are all commonly cited as reasons for their failure. There are some positive things to take from them however. And I find it rather unambiguous that Franco was bad for Spain.
Franco did a military coup against a legitimate government. He proceeded to supress certain languages and rights of many people. It is because of his actions, not because of his associations, that he was a fascist.
It is revisionist, and very bad taste, to pretend he was not fascist.
Franco was semi-fascist (like Stalin btw) (Trotsky called that Cesarism in 1928) because he instated a very hierarchical society based on a cult of the nation, and a full press censorship along with historiography censorship. He lacked a fascist founding mythos (which makes him differ from complete fascism) : while he wanted his nation to be great again (reconstruction myth), he designated no real internal ennemis once syndicalism was banned, and no true external ennemi.
Also, the Spanish republic didn't 'want' a dictatorship of the proletariat at all (they used strike breakers forces once their scabs didn't work ffs), they had to accept it to keep the production going under the threat of Carlists and Francists, but they were pretty much on the side of the bourgeoisie until the civil war.