Catalyzes the reversible dehydration of L-carnitinyl-CoA to crotonobetainyl-CoA. (R)-carnitinyl-CoA = crotonobetainyl-CoA + H2O Amine and polyamine metabolism; carnitine metabolism. Belongs to the enoyl-CoA hydratase/isomerase family.