2

I have some issues with my indentations on GitHub: It shows that I have an indent size of 8 on GitHub even after I changed it to indent size 2 and pushed it.

I have changed the settings on prettier so the code has a indent size 2, and look as it should in my VSCode, but when I commit it is still has a indent size 8.

Attached some photos below and a link to my repo: https://github.com/MT-dotse/project-mongo-api/blob/master/server.js

  • Code on VSCode: Code on VS code
  • Code on GitHub: Code on GitHub
VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
Madelene
  • 23
  • 3
  • Hi managed to solve the issue! I needed to uncheck the "use tabs" , and change the tab width to 2 in the prettier extention. – Madelene Jan 21 '22 at 09:13
  • Well done, good catch. I have included your comment in the answer for more visibility. – VonC Jan 21 '22 at 09:24

1 Answers1

0

I do see your code on GitHub with the expected tab size of 2, not 8.

But that is only because I have set my GitHub account setting "Tab Size" to 2.
Which means any tab is displayed (in my GitHub session on a browser page) as 2 spaces, not 8.


As the OP Madelene adds in the comments, as an alternative solution:

I needed to uncheck the "use tabs", and change the tab width to 2 in the prettier extension.

VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755