Skip to content

Refactor typescript pack #1501

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

Open
azdanov opened this issue May 16, 2025 · 4 comments · May be fixed by #1504
Open

Refactor typescript pack #1501

azdanov opened this issue May 16, 2025 · 4 comments · May be fixed by #1504
Labels
enhancement New feature or request

Comments

@azdanov
Copy link
Contributor

azdanov commented May 16, 2025

Is your feature related to a problem?

At the moment, the TypeScript pack has too many responsibilities (TypeScript, ESLint, Prettier).

Describe the new feature

It would be good to separate it into TypeScript, ESLint, and Prettier packs. The reason is that there are other tools that can be used for formatting and linting, and different combinations of them. At the moment, it's impossible to use those combinations, e.g., pure ESLint for linting and formatting, or no ESLint and only Prettier, or even using Biome.

Additional context

Related issue: #962

@azdanov azdanov added the enhancement New feature or request label May 16, 2025
@Uzaaft Uzaaft marked this as a duplicate of #1496 May 16, 2025
@Uzaaft
Copy link
Member

Uzaaft commented May 16, 2025

From 1496:

Is your feature related to a problem?

At the moment it's just an auto command, which is sufficient.

Describe the new feature

LazyVim seems to have it done in a different way. It's mentioned in conform FAQ that >running LSP formatting (EslintFixAll) rewrites the whole buffer, which is very inefficient >for large files.

Would be nice to figure out if it's possible to use the conform approach of just using a >diff update.

Additional context

https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/plugins/extras/linting/eslint.lua

https://github.com/stevearc/conform.nvim?tab=readme-ov-file#faq
stevearc/conform.nvim#502
stevearc/conform.nvim#466
stevearc/conform.nvim#222

@Uzaaft
Copy link
Member

Uzaaft commented May 16, 2025

Lets target this for release 20

@azdanov
Copy link
Contributor Author

azdanov commented May 16, 2025

This can be done step by step.

  1. Create separate Prettier pack
  2. Create separate ESLint pack
  3. Remove Prettier and ESLint from TypeScript pack
  4. (Optional) Add Biome pack

@Uzaaft
Copy link
Member

Uzaaft commented May 16, 2025

Me like this. Seems like the right direction to move in.
Would make debugging and fixing eslint stuff easier I recon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants