-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
endOfLine changed from auto to LF in v2.0.0 doesn't take effect #1327
Comments
Can you provide a github repo I can use to duplicate this? Everything in the log output is correct (the output config only shows overridden info so the endOfLine is set to default). |
Sure https://github.com/datorama/akita
Still prettier should complain about every line in every file as I'm running on Windows I discovered this when I added https://github.com/prettier/eslint-plugin-prettier to the eslint rules. Because it went absolutely nuts and complained about every line in every file :) |
Can you tell me if you run prettier from the CLI does it fix the line endings correctly? |
Yep. checking format ❯ yarn prettier --check .\libs\akita\src\lib\updateEntities.ts
yarn run v1.22.0
$ ~\Repos\akita\node_modules\.bin\prettier --check .\libs\akita\src\lib\updateEntities.ts
Checking formatting...
libs\akita\src\lib\updateEntities.ts
Code style issues found in the above file(s). Forgot to run Prettier?
error Command failed with exit code 1. formatting ❯ yarn prettier --write .\libs\akita\src\lib\updateEntities.ts
yarn run v1.22.0
$ ~\Repos\akita\node_modules\.bin\prettier --write .\libs\akita\src\lib\updateEntities.ts
libs\akita\src\lib\updateEntities.ts 169ms
Done in 0.47s. |
@ntotten are you not able to reproduce this? Can I assist any further? |
Same here. While editorconfig vscode plugin takes effect. |
Same here with vscode as well |
It seems that even |
It might make sense to check the implementation of the EditorConfig extension to use the same way to override VS Code's newline settings. |
I have the same problem,VS code Prettier not work,but Prettier CLI work correctly 😐 |
This is still a problem, on vscode my settings are to have the end line as |
i was playing with it, but end up with using |
I'm having the same issue. CLI works, vscode format with prettier doesn't |
I have this problem too, as it doesn't convert EOLs on "Format document" command. Any updates on this? |
still doesn't work, it's been over 4 years now, lol. |
Encountered this today, was very incredibly confusing to track down a case where locally running prettier updated line endings as expected but a colleagues result in no change, was due to a global git config Would be good if there was some output or suppressible warning if the While the issue is here under the plugin, the execution via cli resulted in the same |
Summary
Line endings was changed from auto to LF in prettier v2.0.0. However this doesn't change CRLF files to LF when formatting.
Github Repository to Reproduce Issue
Any CRLF file prettier supports will do
Steps To Reproduce:
Use prettier v2 default config
Expected result
Prettier should report line ending errors.
Prettier should change line endings to LF on format.
Actual result
Line endings are still CRLF after formatting.
Additional information
VS Code Version: 1.44.1
Prettier Extension Version: 4.4.0
OS and version: Windows 1909
.prettierrc
.editorconfig
Prettier Log Output
The text was updated successfully, but these errors were encountered: