Prettier error (on Windows) from line endings in js/**/*.tsx files
#45995
calebd-anderson
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Cloning keycloak with a typical git configuration on Windows defaults to
CRLFline endings injs/**/*.tsxfiles, yet Prettier is configured to requireLFline endings. Some explanation in the GitHub docs - configuring git to handle line endings.I'd like to propose two options which the Prettier docs also explain:
.gitattributeswith the specific*.tsx text eol=lfdeclaration (this would suggest Windows users re-clone the project).js/eslint.config.jswith a"prettier/prettier": ["error", { endOfLine: "auto" }],rule.The Prettier docs highlight that
LFis enforced by default as of v. 2.0.0 which makes me lean towards updating the.gitattributesfile. I have created the PR that accomplishes this here.Beta Was this translation helpful? Give feedback.
All reactions