Who decides who can, and cannot advertise? There are many ways to solicit donations - the problem here is he chose to go against convention and put those ads in a common space. Does every other contributor of JS packages not have this right to advertise?
Perhaps NPM requires specific rules against advertisement, but the moral aspect wrt is "this is why we can't have nice things", or in this case, why we need explicit rules.