Closed andreyscott closed 1 year ago
Hello @andreyscott, for in case of typeScript files (frontend web page) I solved this issue by replacing all ' ' with " ", but for these files (above screenshots) we may need to remove prettier like you mentioned.
There's a lot of different ways to fix it but the one I proposed was the better I have seen so far
@erwanp should I make the required changes?
It would be nice to have the same file endings checked into source no matter whether it's from linux, windows, etc.
If the prettier config with eslint is applied, does it standardize the file endings the same way regardless of the operating system?
Yes. @suzil According to my research, the above solution is the best way to fix the issue for all OS another possible solution would be to create a .prettierrc file or a .prettierrc.json and add "endOfLine":"auto"
to it
https://stackoverflow.com/questions/53516594/why-do-i-keep-getting-eslint-delete-cr-prettier-prettier I added a stackoverflow link if you would like to do further research
🐛 Describe the bug
[eslint] Delete
CR
[prettier/prettier] it's to my understanding of the codebase a line break error that occurs on the end of every line of the .tsx file the line breaks of the text file on windows and linux are different. Windows At the time of line break, carriage return is used at the same time CR(carriage-return character) and line breaks LF(linefeed character) Mac and Linux only use the newline character LF Old version of Mac uses carriage return CR Therefore, there will be incompatibility problems when text files are created and used in different systems.💡 Possible solutions
A lot of solution comes to mind but I think the best will be and the one that works all the time will be to remove the below line of code from the .eslintrc.json
"plugin:prettier/recommended",
and the for good measure restart your code editorBrowser
Edge