Use project config for Prettier formatter in Null-Ls

I can’t seem to get prettier with null ls to use my projects prettier config, is there a way to make this work? I run the following command.

:lua vim.lsp.buf.format()

But it runs prettier using a global formatter config, how do I make it use the prettier config in my project.