-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(formatter): Avoid rewriting the file if it has not been changed
We use djLint as part of treefmt [1] to reformat HTML templates tree-wide, and treefmt looks at file modification time to determine if it was reformatted or not. And with --fail-on-change option passed, it exits with status 1 when it thinks files are modified. This patch makes djLint not rewrite the file if there are no changes to write back, which makes treefmt --fail-on-change do the right thing. [1]: https://github.com/numtide/treefmt
- Loading branch information
Showing
2 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters