question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] how to change eol of auto generated d.ts

See original GitHub issue

In my project, eol is set as ‘crlf’ in rule of prettier. However, each time I launch vite, eol in auto-import.d.ts is replaced with ‘lf’. Is there a recommended way to solve this? As this file is the only one in ./src folder which is generated by a package, it seems not elegant to create prettier and eslint ignore file just for it. Maybe there is another way?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JounQincommented, Aug 4, 2022

Why you care about auto-generated files? They should be listed in .eslintignore and .prettierignore IMO.

1reaction
azaletacommented, Jun 17, 2022

Maybe we could generate the disable comments for prettier and eslint out-of-box. WDYT?

eslint: Easy Mode prettier: Hell Mode

according to #5287 prettier don’t support block disable in TS/JS so the dts file will be something like

  // prettier-ignore
  const $$: typeof import('vue/macros')['$$']
  // prettier-ignore
  const $: typeof import('vue/macros')['$']
  // prettier-ignore
  const $computed: typeof import('vue/macros')['$computed']

this is really annoying

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript: How to auto generate a d.ts file for image
Include your TypeScript Declaration File in your tsconfig.json . { "compilerOptions" { ... }, "include": ["path/to/index.d.ts"] }.
Read more >
Force LF line ending on auto generated file next-env.d.ts on ...
If I change the line endings of the file next-env.d.ts to LF, after a while the file automatically changes back to CRLF. The...
Read more >
gitattributes Documentation - Git
When text is set to "auto", the path is marked for automatic end-of-line conversion. If Git decides that the content is text, its...
Read more >
End-of-life or second-life options for retired electric vehicle ...
Recently, stakeholders have become more confident that giving the retired batteries a second life by reusing them in less-demanding applications ...
Read more >
Upgrade Guide - Quasar Framework
The API of Quasar components, directives and plugins has minor changes, ... Create a src/quasar.d.ts file and copy into it the content from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found