-
Notifications
You must be signed in to change notification settings - Fork 202
tsconfig.json keeps getting converted to Unix line endings #216
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
Comments
sorry about that. Fixed with |
Thanks! |
For those of us who prefer LF, the "fixed" behavior is undesirable. I think this issue cannot be resolved to everyone's satisfaction until Atom itself is fixed - it uses LF, and has no option to change it. Atom should have a user preference for line endings, and atom-typescript should adopt that. In the meantime, I feel like Atom packages should do what Atom does (LF). @ChaosinaCan how do you handle editing code with Atom if you prefer CRLF? I use Atom on Windows and it always uses LF (which is fine by me, but it really should be configurable). |
No, it takes a majority vote based on the contents of the file (I know for sure). If file is empty it uses os.EOL (I think). |
For new files, I am on Windows, and it uses LF. So it only adopts something other than LF if you open an existing file with different line endings. |
You are right. Sorry. My bad. |
Correct. Atom appears to default to LF, but after I convert the file to CRLF, it uses CRLF from then on. |
Clearly, the rational thing to do is to follow suit from Atom and scan every file listed in Or add your thoughts on the Atom issue: |
Heh. Maybe a more rational way to follow Atom's behavior would be: if tsconfig.json doesn't exist, create it with LF. If it does exist, check what the first line ending in the file is and use that when you rewrite it. |
@msssk if you agree create a new issue here for tracking (up for grabs). I am okay with this 👍 |
I'd really like to see Atom make this user-configurable, but in the meantime if we can maintain the existing line endings I can at least update my atom-typescript package past 1.13! I created #224 for this. |
When I have tsconfig.json saved with Windows-style line endings (CRLF), and then I do almost anything within Atom (open a file, save a file, etc.), the file is rewritten with Unix-style line endings (LF). This is frustrating when your Git environment is set to check out files with Windows-style line endings.
The text was updated successfully, but these errors were encountered: