The previous fix for pre-commit was poorly done. The default experience for a pre-commit hook is to pass all the discovered filenames to the entry, and when yamlfmt receives references to exact files in its list of arguments, by design it will run them through the formatter without checking whether the config would want to run them. With the fix in v0.18.0, this would cause all files in a repo, including non-yaml ones, to run through the formatter unconditionally. I think I have finally settled on a proper implementation, which is explained in the docs.
On a related note, if you are knowledgeable about pre-commit and interested in the future of this project as a pre-commit hook, please take a look at my recent announcement: #278