The 2017 version with or without Touch Bar?
If without Touch Bar then I'd choose the 2018 MacBook Air out of the three. The non-TB 2017 MBP has only negligibly better performance (less than 10% I believe) than the new Air, aswell as a slightly better/brighter screen panel, but in everything else the Air is superior. If you're talking about the 2017 MBP with Touch Bar, then I'd say go with that one, as it not only has a noticeably larger edge over the 2018 Air in performance, but also a number of other advantages.
The 2017 MacBook I'd only advise buying if thinness and portability matters to you above all else. Otherwise, the other two are superior to it in almost every way.