Quick and dirty version for uBlock Origin:
news.ycombinator.com##tr.athing:has(a[href*="medium.com"])
news.ycombinator.com##tr.athing:has(a[href*="medium.com"]) + tr
news.ycombinator.com##tr.athing:has(a[href*="medium.com"]) + tr + tr.spacer
If somebody can improve this, please share.