-
-
Notifications
You must be signed in to change notification settings - Fork 717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated prettier-ignore comments do nothing #2673
Comments
For the time being, on some versions of prettier, this seems to be working. In general, you should ignore the generated file from your formatted and linter. Prettier: https://prettier.io/docs/en/ignore.html#ignoring-files We should call this out in the docs. |
As far as I'm aware the |
I must be mistaken then 🤔. What would you suggest as the best option here outside of updating the documentation? I'm thinking of possibly updating the head comment of the generated output file, telling the user to ignore the generated file from their linter and/or formatted. Whatever path forward, we'd definitely want to avoid having to update the user's |
Yeah, I agree that calling this out in the docs and updating the head comment is probably the best way forward - I don't think there's much automation that can/should be done (at least, until prettier gets around adding a |
FYI @thomasballinger thought you'd be interested in knowing about this find. |
Which project does this relate to?
Router
Describe the bug
By default, the router generator will add
prettier-ignore-start
andprettier-ignore-end
comments to the generated file (functionality added in #1157):router/packages/router-generator/src/config.ts
Line 24 in 2c4ff91
router/packages/router-generator/src/config.ts
Line 32 in 2c4ff91
However, these comments are not actually supported by prettier - the
start
/end
range comments are only supported in Markdown right now - prettier/prettier#5287Your Example Website or App
https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBbAhjATgSwB4AUAOlAASkCMANKQAw30nn2UNVN1uUkCUJJAegBUpAA5Y4MGDjhYAtDgDmUCBLkBnGOiwxSQgSQzZ8xMq06cOLapbMtrvQSPGTpshctVw5CACZ6BECoQCFFpaHVkUG0sCAB3AAVtBEiUdAAbOPQAT0jggCMsdDAAa0kAZXRUOAAZHCg4ZAAzDPU4AqLSitFi+sVkbABXdpA21BwBrGHguDxRWRxq2AyAFVkobRlUlvS24PU+9LgARUGIeGbWkYArdTxyw5Ozi6QdvZAAR2e4BNjRVJA6HUcgacF8YKCIGw6Bw6T6AGEIKgMMhAel0pCDlBFEcAIJSXD5QbwBKyOoNS67EYACxgqHSAHVqTh4OoemA4OUUiycAA3FnZVFgdR5EC84YASSg4Ng5TAuDCuOl5Rg2SOlPe4ggbQZRVEqJcbSwvMawXqRpgv3QihRryuwR6WCNqNV83U8pwYUh4nqMAZOF8MGpyAAHPQQBIvjgJFabegNSMtPl-YHg0gAEzBQZtFbofLbe0gOCofJg8G+GrobGDa1wABiqiM0mxqPQxIgIAAvp2gA
Steps to Reproduce the Bug or Issue
Expected behavior
The presence of the non-functional prettier-ignore comments is confusing. They should just be removed from the default configuration since there is no way to get prettier to ignore a whole file through comment directives (prettier/prettier#3634).
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: