-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature request: Configurable New-Line/End-of_line characters #18
Comments
I think that the detecting line ending by using Therefore, it is necessary to regulate line endings manually. And since |
@jens-duttke, what do you think to solve the current problem with customtypings? |
@c0gnize: For my usecase this workaround fixed the problem. |
The End-Of-Line characters used in newly created d.ts files always depends on the system setting. That means it differs between Unix/Linux/Mac (LF) and Windows (CRLF).
I'm working in projects where LF is forced and an ESLint rule ensures the correct EOL characters.
The result is, for every new d.ts file created by this loader on Windows, I have to manually switch the EOL characters manually.
Git fixes that automatically using the
.gitattributes
, but that requires that I first commit my changes to get the correct line endings.Another hack I found, was to place this at the beginning of my webpack.config.js:
But instead of using hacks or relying on third-party software, it would be nice if this plugin could use the correct EOL characters by itself.
I could imagine atleast 3 ways how to do that:
.editorconfig
option
which allows to configure the line-ending the user prefers.TypeScript provides in the
tsconfig.json
also an optionnewLine
to configure the line-ending, but that's for the generated JavaScript file, not for the TypeScript code - since this can differ, it shouldn't be considered here.What do you think?
The text was updated successfully, but these errors were encountered: