Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

[BUG] Formatting typescript file does not respect shiftwidth settings, hence tabSize is incorrect #423

Open
tuanbass opened this issue Jan 31, 2023 · 0 comments
Labels
scope: bug Something isn't working

Comments

@tuanbass
Copy link
Contributor

Current Behavior:

When I try to format my typescript code, even when my nvim "shiftwidth" is 4, the formatted code is always use tabsize of 2

Expected Behavior:

Tabsize for formatted code should be 4

Steps To Reproduce:

  1. open a typescript file
  2. change the nvim 's shiftwidth to 4 (or what ever ). In mycase, I use editorconfig setting.
  3. format the code
  4. Check the result tab size

Anything else:

I Performed some debug, and after awhile, it's seemed that eslint_d's formatter does not respect the setting. Nullls get the correct shiftwidth and pass correct value to eslint_d, but eslint_d just ignore it. It's possible that I have a misconfiguration, but I tried all ways but failed to force eslint_d to use correct shiftwidth

My Suggestion is to use prettierd for formatting typescript code (and maybe javascript code also) instead of eslint_d

@tuanbass tuanbass added the scope: bug Something isn't working label Jan 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant