Replies: 1 comment 2 replies
-
you are correct, the file should be ignored by any formatter. /* prettier-ignore-start */ Formatting the generated file using those prettier options is deprecated and will be removed in future major releases. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Presently, when running my Vite app with the router plugin, the route tree seems to continually be regenerated on file changes, writing to a format which doesn't match my Prettier config (which uses tabs, not spaces). Since Prettier runs on committed files automatically via a git hook in my project, if I attempt to commit this change, the route tree file is then rewritten using my project's Prettier config, returning it to its original state, leading to no working changes in Git again, and the commit fails.
The end result is my git repo always has dirty changes on the route tree file which can never be committed, only endlessly reverted to keep the working changes clean.
My workaround is to add the route tree file to my
.prettierignore
, which is probably intended, but I think it would be preferable for the generator to utilize Prettier's config discovery to simply inherit the closest prettier config if available, rather than exposing some subset of options to the plugin config (or, in addition to that).Beta Was this translation helpful? Give feedback.
All reactions