(From discussion in #1453)
For npm-based formatters, one can supply npm-modules to be used:
prettier([ 'my-custom-module': '1.0.0', 'my-second-custom-module': '0.2.0'])
It would be nice to be able to create that list using npm itself e.g. using
echo "$(npm info --json "my-custom-module@latest" peerDependencies) $(npm info --json "my-second-custom-module" peerDependencies)" | jq -s add > dependencies.json
and then use that file as input
prettier().usePeerDependenciesFrom('dependencies.json')