I just looked it up and section M1503.1 of the 2018 International Mechanical Code has an exception for range hoods which allows most to be used ductless. Some states, CA for example, don't allow this but the majority of states just follow the IMC code.
Where I am, it's called non-conforming and, unless there's a complaint, it doesn't become a problem until you pull a building permit AND a Building Official notices.