dprint
dprint copied to clipboard
"No files found to format with the specified plugins at [...]" unless project is git repository (confused me)
Hi, I am not sure if this is a bug or expected behavior. I only got dprint to run in a git folder/project.
I set up a new project without initializing git from the start and I just could not get dprint to format anything. I only got the No files found to format [...] message. Neither with (pnpx) dprint fmt or by specifying a file (pnpx) dprint fmt "dprint.json". Only after I ran git init it was possible to format something.
My expectation was, that dprint would use the cwd or the closest directory with a dprint.json from the cwd or something like that. In contrast prettier dprint.json --write works for me.
If this is expected behavior, I think it should be mentioned in the documentation. As far as I can tell (I hope I didn't miss anything), this is not explicitly stated. I wouldn't mind creating a PR for that.
dprint version is 0.47.2