I handled your spam flag there. It was my mistake that I declined your flag. Let me start off by mentioning that affiliate links are considered spammish on Stack Overflow:
Your affiliate ID does nothing to enhance an answer. It serves only to provide you with income. You're not the one incurring a cost by hosting content on Stack Overflow, so you're not the one who deserves to be paid. We're all volunteering our time and knowledge here for free. Allowing affiliate links would give the wrong kind of encouragement for people to post here.
This should clear up a lot of confusion over whether it is considered spammish or not (but do read the rest of the post before using the red spam flag on it). Now coming to the posts at hand:
the user posted the same answer on three different questions.
This is against the policy of Stack Exchange. It is not acceptable to post the same answer to multiple questions. Fortunately, the system already raises an automatic flag, in those cases, which is how I discovered them. The flag queue was a bit low, which is why I managed to handle them early on. I did not see any of your/others NAA flags, as they are hidden until 1 hr, which is probably why your NAA flags were marked helpful (but not the spam flag).
To clear things off the table again, posting the same answer to multiple questions isn't spam unless they are deliberately trying to be promotional (which falls under the overt-self promotion bracket).
I reported this answer as spam, since it contains affiliate links
This is the part which I actually missed. I saw the spam flag 3~4 seconds after it was raised (perhaps I should delay my flag handling). I did a search of all the posts containing a URL to that domain. The domain seemed quite famous. I did hover over the link and see a index.html and a long code, but I didn't guess that it was an affiliate code. I saw the post itself. It was posted by an established user of the site. They did have several other contributions and I could not find any links form the profile which showed that the user was affiliated with that site. Furthermore, they clearly explained the way to use the library and did not just leave a link to it. All these are indicative of a clean answer and not spam. So I declined it. (Now 1 decline doesn't result in a flag ban. If you have lots of declines that would affect)
After the decline, the meta was posted immediately. I was informed in the comments that the links contained referral codes, where I realized my mistake. I apologized for the screw up, immediately disputed your flag (disputed flags don't count against you) and warned the user. The user also immediately responded that they did not know about the rule and they edited out the referral links from the answer.
Now here is where the story becomes sad ... Thanks to the meta effect, the answer kept on receiving spam flags long after the post was edited to remove the referral links. The post was downvoted, despite being a proper answer to the question.
There's something called as the Hanlon's Razor, which states, "Never attribute to malice that which is adequately explained by stupidity". The poster there was naïve and was not aware of the rules. Once educated, they immediately apologized and rectified it. We are now (continuously) punishing a user, with spam flags, even though they have corrected themselves.
The comments made me think about the situation. The answer was quite valid, and would probably have helped someone in the future. The only issue which it had was that it contained affiliate links. The user was already an established user of the site and would certainly have been receptive to feedback. Surely educating them would have been a better option.
Nuking useful posts is almost never a good thing. The spam flag has other negative connotations as well, once spam nuked, the post is locked and no one can edit it (apart form diamond moderators), the user gets a penalty of 100 rep, their IPs are fed to the spam ram, they probably could get an answer ban, and also posting limits. That's a clear turn off for any user who wants to contribute to the site.
If it was a new (unregistered) user, doing this, then I'd not be thinking twice about any of these and would have just nuked the post, them and every trace of what they left on the site. But here it was a user who has provided lots of useful answers to the site. Sending them off because of an issue, which could have been solved in other ways doesn't quite paint a good picture about our community as a whole.
So in hindsight, and probably I'm making a controversial statement but, if you see that a user has posted a valid answer to the question, and the only fault of theirs is that they are using affiliate links, please please do use the other flag and explain it to us. We will temporarily delete the answer and send the user a warning. If they decide to remove the links, then it's good for us and for the programmer community, and we can undelete it. If they don't, then the answer remains deleted and the next time they post a similar answer, it would get escalated to suspensions and finally lead to a deletion of their account.
I'm not asking you to "not mark spam as spam", and I clearly know that we should not be editing spam, but just that take a small bit of consideration about the other factors involved. If there is some value which you can extract out of the post, then perhaps the 6-flag-100-rep-spam-nuke isn't a better option than using the custom flag.
Again this is just my opinion as a community member like you, but if you wish to continue using the spam flag on those posts, then feel free to. As a moderator, I'm obliged to mark them helpful.
I'm sorry for declining the flags, and I'm ready to don the paper bag.